Instrument the Codex agent loop on Cloudflare Workers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ai-infra-agents, javascript, typescript
調査の方向性
Read the related issues #16966, #18910, and #24993, then inspect the existing instrumentAgentWithSentry support and pi-durable instrumentation mentioned in the issue. Reproduce the Cloudflare example with its offline StressModel and a tool-calling turn to confirm which spans are missing. Done means agent runs, Task steps, and direct LanguageModelV4.doStream/doGenerate calls are represented in traces, including aborted and replayed turns.
索引モデルが issue の本文から書いたものです。
説明
Problem Statement
Cloudflare's Codex agent loop example (changelog) runs the Codex turn loop in a plain DurableObject composed with the Agents SDK Lifecycle, Tasks, Sessions, and Streams capabilities. With @sentry/cloudflare 11.12.0 and sentryCloudflareVitePlugin, a turn runs and request, alarm, and error traces work. The agent loop itself does not show up in traces.
Observed running the example locally in workerd (agents 0.33.0, the example's offline StressModel, a turn with tool calls):
- No
gen_aispans. The harness callsmodel.doStream()on theLanguageModelV4directly, notstreamText/generateText, so the Vercel AI integration does not see model calls. Tools run inside the harness, so there are noexecute_toolspans either. With a real Workers AI binding,instrumentWorkersAiClientmay add bare chat spans (not verified). There would still be no agent or tool spans. - The turn is an anonymous alarm trace.
Tasksenqueues the turn and a Durable Object alarm runs it. The alarm trace links to the request that scheduled it (previous_trace), but nothing marks it as an agent run or shows its Task run and steps. - Lost segment when the object resets. When the Durable Object aborts mid-turn (
ctx.abort), the aborted alarm's child spans arrive without their parent alarm segment, and no error is recorded. The replayed run succeeds in a new alarm trace with nothing that ties it to the aborted attempt.
Solution Brainstorm
Starting points, not a design:
- Recognize
Lifecycle.install(this)Durable Objects and the Task runs and steps they execute, the wayinstrumentAgentWithSentrycoversAgentclasses and PiHarness is covered for pi-durable. - Capture model calls made through
LanguageModelV4.doStream/doGenerate, not only through theaihelpers.
Additional Context
Related: getsentry/sentry-javascript#16966, getsentry/sentry-javascript#18910, getsentry/sentry-javascript#24993
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
via Jan Peer Stöcklmair.
--
- 主要言語
- TypeScript
- スター
- 8.8k
- フォーク
- 1.9k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 744
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-javascript のほかの issue
-
AWS Lambda Waiting for: Product Owner
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
getsentry/sentry-javascript#26910 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Only create Nuxt database and storage spans when there is a parent span再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンImprovement Nuxt
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
getsentry/sentry-javascript#25805 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Only create Cloudflare storage and D1 db spans when there is a parent span再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンCloudflare Workers Improvement Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-javascript#25804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Core Feature: Typescript Meta: Breaking
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-javascript#25286 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-javascript#24200 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-javascript の issue をすべて見る
似ている issue
-
foreground-up-signals-live: delivery-repair cell expects a spawn suggestion status no longer printsオープンbug triage:owned
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4905 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
directus/directus#28558 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
review: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
1lck/Lithe-IDEA#2432 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
cloudflare/workers-sdk#17189 ·
メンテナーはふだん 1 日以内に返信