Instrument the Codex agent loop on Cloudflare Workers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- ai-infra-agents, javascript, typescript
- Ambito
- backend-api-design, observability
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
--
- Lingua principale
- TypeScript
- Stelle
- 8.8k
- Fork
- 1.9k
- Merge medio
- 1g 8h
- PR unite (30g)
- 744
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
getsentry/sentry-javascript#26910 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Only create Nuxt database and storage spans when there is a parent spanForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaImprovement Nuxt
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
getsentry/sentry-javascript#25805 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Only create Cloudflare storage and D1 db spans when there is a parent spanForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaCloudflare Workers Improvement Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-javascript#25804 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Core Feature: Typescript Meta: Breaking
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-javascript#25286 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-javascript#24200 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/sentry-javascript
Issue simili
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
garrytan/gbrain#10437 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Forse già presa @acmerfight l’ha presa oggi. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
earendil-works/pi#12573 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
agentes-chat/agentes-chat#1506 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/desktop desktop/files os/windows P2 type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
NousResearch/hermes-agent#160359 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing repro Platform: Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
software-mansion/react-native-reanimated#11554 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno