Instrument the Codex agent loop on Cloudflare Workers
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- ai-infra-agents, javascript, typescript
- Domínio
- backend-api-design, observability
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
--
- Linguagem predominante
- TypeScript
- Estrelas
- 8.8k
- Forks
- 1.9k
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 744
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
getsentry/sentry-javascript#26910 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Only create Nuxt database and storage spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaImprovement Nuxt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
getsentry/sentry-javascript#25805 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Only create Cloudflare storage and D1 db spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaCloudflare Workers Improvement Spans
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
getsentry/sentry-javascript#25804 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Core Feature: Typescript Meta: Breaking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
getsentry/sentry-javascript#25286 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
javascript
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
getsentry/sentry-javascript#24200 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de getsentry/sentry-javascript
Issues semelhantes
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
garrytan/gbrain#10437 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Talvez já em andamento @acmerfight assumiu hoje. Abertauntriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
earendil-works/pi#12573 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
agentes-chat/agentes-chat#1506 ·
Mantenedores costumam responder em até 1 dia
-
comp/desktop desktop/files os/windows P2 type/perf
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
NousResearch/hermes-agent#160359 ·
Mantenedores costumam responder em até 1 dia
-
Missing repro Platform: Android
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
software-mansion/react-native-reanimated#11554 · 1 comentário ·
Mantenedores costumam responder em até 1 dia