[Cloudflare] instrumentWorkflowWithSentry does not capture a NonRetryableError thrown before the final attempt
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend-api-design
Línea de trabajo
Empieza leyendo instrumentWorkflowWithSentry y WrappedWorkflowStep.do, especialmente instrumentedCallback, donde la captura depende actualmente del número de intentos. Revisa las pruebas existentes de instrumentación de workflows de Cloudflare y añade cobertura para un NonRetryableError lanzado antes del último intento de reintento. Se considerará terminado cuando ese fallo produzca un evento de Sentry y el comportamiento al agotarse los reintentos siga cubierto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.8k
- Forks
- 1.9k
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 682
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getsentry/sentry-javascript
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)AbiertoBug Cloudflare Workers Spans
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-javascript#26120 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Vercel AI: `gen_ai.system_instructions` is missing when the system prompt is a message objectPosiblemente ocupada @biggdawg320 la tomó hace 1 día. AbiertoBug Package: node Spans vercel ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
getsentry/sentry-javascript#26079 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
fsIntegration crashes in native ESM when patching the read-only fs namespacePosiblemente ocupada @chargome la tomó hace 1 día. AbiertoBug Node.js Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-javascript#25950 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
normalize() throws when a getter throws a Symbol or a null-prototype objectPosiblemente ocupada @rjmcgee53192 la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-javascript#25920 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Only create Nuxt database and storage spans when there is a parent spanPosiblemente ocupada @nicohrubec la tomó hace 6 días. AbiertoImprovement Nuxt
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
getsentry/sentry-javascript#25805 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de getsentry/sentry-javascript
Issues similares
-
Report: &TV InternationalAbiertocheck:passed streams:remove
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
bug priority-p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
beginner blocked
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Los mantenedores suelen responder en 1 día
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.AbiertoMonthly Not a priority
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Expensify/App#106080 · 1 comentario ·
Los mantenedores suelen responder en 1 día