[Cloudflare] instrumentWorkflowWithSentry does not capture a NonRetryableError thrown before the final attempt
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend-api-design
Direzione di ricerca
Inizia leggendo instrumentWorkflowWithSentry e WrappedWorkflowStep.do, in particolare instrumentedCallback, dove la cattura dipende attualmente dal numero di tentativi. Controlla i test esistenti per la strumentazione dei workflow Cloudflare e aggiungi una copertura per un NonRetryableError generato prima dell’ultimo tentativo di ripetizione. Il lavoro è completato quando tale errore produce un evento Sentry e il comportamento all’esaurimento dei tentativi resta coperto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
Related: #17421, #21025
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/cloudflare
SDK Version
11.9.0 (the code is the same in 11.10.0 and on develop)
Framework Version
wrangler 4.98.0, compatibility_date 2025-06-04
Reproduction Example/SDK Setup
import { WorkflowEntrypoint } from 'cloudflare:workers'
import { NonRetryableError } from 'cloudflare:workflows'
import * as Sentry from '@sentry/cloudflare'
class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event, step) {
await step.do('load', { retries: { limit: 2, delay: '1 second' } }, async () => {
throw new NonRetryableError('permanent failure')
})
}
}
export const Instrumented = Sentry.instrumentWorkflowWithSentry(
(env) => ({ dsn: env.SENTRY_DSN }),
MyWorkflow,
)
Steps to Reproduce
- Wrap a Workflow with
instrumentWorkflowWithSentry. - Throw a
NonRetryableErrorin astep.dowithretries.limit > 0. - Trigger an instance.
Expected Result
One Sentry event for the NonRetryableError that ends the instance.
Actual Result
No event. WrappedWorkflowStep.do only captures when attempt > retries.limit, and a NonRetryableError ends the instance on attempt 1. Regression since 10.56.0 (#21025): before, the step error was captured on every attempt, so it was reported.
Additional Context
#17421 asked for one error "once all step.do retries have been exhausted, or on a NonRetryableError". #21025 covered only the first case.
Suggested fix: in instrumentedCallback, also capture when error.name === 'NonRetryableError'. I'm happy to open a PR with integration tests.
- Lingua principale
- TypeScript
- Stelle
- 8.8k
- Fork
- 1.9k
- Merge medio
- 1g 20h
- PR unite (30g)
- 682
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
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)ApertaBug Cloudflare Workers Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-javascript#26120 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Vercel AI: `gen_ai.system_instructions` is missing when the system prompt is a message objectForse già presa @biggdawg320 l’ha presa 1 giorno fa. ApertaBug Package: node Spans vercel ai
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
getsentry/sentry-javascript#26079 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
fsIntegration crashes in native ESM when patching the read-only fs namespaceForse già presa @chargome l’ha presa 1 giorno fa. ApertaBug Node.js Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-javascript#25950 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
normalize() throws when a getter throws a Symbol or a null-prototype objectForse già presa @rjmcgee53192 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-javascript#25920 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Only create Nuxt database and storage spans when there is a parent spanForse già presa @nicohrubec l’ha presa 7 giorni fa. ApertaImprovement Nuxt
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
getsentry/sentry-javascript#25805 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/sentry-javascript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/durable-harness#53 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area/docs area/ui enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
melgarafael/DeskcommCRM#4098 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
kerti/balances-v2#801 ·
I maintainer di solito rispondono entro 1 giorno
-
lesson-submission pending-review
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
Ikalus1988/MisakaNet#4510 ·
I maintainer di solito rispondono entro 1 giorno