Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix(gasoline): bound traces from long-lived workflow loops

オープン
#5,671 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Dheerajvarma1 がすでに取り組んでいます。

2026年9月5日 から。

  • #5675 @Dheerajvarma1 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

engine/packages/gasoline/src/builder/workflow/lupe.rs の284行目付近から始めます。ここでは workflow の反復処理が長期間存続する span を継承しています。周囲のループ計装を読み、その後 rustfmt --check と cargo check -p gasoline を実行します。各反復処理がそれぞれ固有の trace に限定され、同時に workflow span への因果関係が保持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

Gasoline workflow loops can keep one OpenTelemetry trace ID for the full lifetime of a long-running workflow. Each loop iteration is instrumented as a child of the long-lived LoopBuilder::run / workflow span, so traces grow without a bound.

The current implementation is here:

https://github.com/rivet-dev/actors/blob/caed5835f/engine/packages/gasoline/src/builder/workflow/lupe.rs#L284

Evidence

Observed with Rivet Engine 2.3.0-rc.5 in self-hosted staging and production:

  • One block-only Tempo response contained 12,205 Rivet spans over 65 minutes and required 50,389,617 inspected bytes.
  • The visible iteration counters were already 7,650–7,778, showing that the trace belonged to a much older workflow parent.
  • The largest operation groups were txn (2,046), txn_attempt (2,045), and four signal-listening operations (1,269 each).
  • Over 36 hours, Tempo emitted 247 oversized-trace warnings from 3 trace IDs in staging and 151 warnings from 39 trace IDs in production.
  • The most repeated production trace had the same shape: 12,313 spans dominated by transaction and signal-loop operations.
  • These traces repeatedly hit Tempo's trace-size guard during compaction and contributed to ingester/compactor memory pressure.

The current public main still has the same inherited iteration span, and I could not find an existing issue or PR for this behavior.

Suggested fix

Start each workflow iteration as a new root trace and preserve causality by linking it to the workflow span:

let parent_span_ctx = tracing::Span::current()
    .context()
    .span()
    .span_context()
    .clone();
let iteration_span =
    tracing::info_span!(parent: None, "iteration", iteration=%previous_iteration);
iteration_span.add_link(parent_span_ctx);

let res = async {
    // existing iteration body
}
.instrument(iteration_span)
.await?;

This bounds each trace to one workflow iteration while retaining a causal link to the long-lived workflow. I have this change locally and rustfmt --check plus cargo check -p gasoline pass.

主要言語
Rust
スター
6.3k
フォーク
271
平均マージ
2日 16時間
マージ済み PR(30日)
89

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rivet-dev/rivet のほかの issue

rivet-dev/rivet の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。