[Cloudflare] instrumentWorkflowWithSentry does not capture a NonRetryableError thrown before the final attempt
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách đọc instrumentWorkflowWithSentry và WrappedWorkflowStep.do, đặc biệt là instrumentedCallback, nơi việc ghi nhận hiện phụ thuộc vào số lần thử. Kiểm tra các bài kiểm thử hiện có cho phần instrumentation workflow của Cloudflare và bổ sung kiểm thử cho một NonRetryableError được ném ra trước lần thử lại cuối cùng. Hoàn thành khi lỗi đó tạo ra một sự kiện Sentry và hành vi khi đã hết số lần thử vẫn được kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 8.8k
- Fork
- 1.9k
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 682
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-javascript
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)Đang mởBug Cloudflare Workers Spans
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-javascript#26120 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Vercel AI: `gen_ai.system_instructions` is missing when the system prompt is a message objectCó thể đã có người làm @biggdawg320 đã nhận 1 ngày trước. Đang mởBug Package: node Spans vercel ai
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
getsentry/sentry-javascript#26079 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fsIntegration crashes in native ESM when patching the read-only fs namespaceCó thể đã có người làm @chargome đã nhận 1 ngày trước. Đang mởBug Node.js Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-javascript#25950 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
normalize() throws when a getter throws a Symbol or a null-prototype objectCó thể đã có người làm @rjmcgee53192 đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-javascript#25920 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Only create Nuxt database and storage spans when there is a parent spanCó thể đã có người làm @nicohrubec đã nhận 7 ngày trước. Đang mởImprovement Nuxt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
getsentry/sentry-javascript#25805 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/sentry-javascript
Issue tương tự
-
unwrapDatabaseError masks real DB errors with TypeError: Cannot convert object to primitive valueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
NEARBuilders/everything-dev#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vercel-labs/durable-harness#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Redesign tab bars ignore clicks on Linux: hidden chat layers keep window drag regionsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
experiência: a doc manda subir para o Micro do Supabase, mas não diz que exige plano pago nem quanto custaCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea/docs area/ui enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
melgarafael/DeskcommCRM#4098 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies platform: ios
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
software-mansion/react-native-executorch#1617 ·
Maintainer thường phản hồi trong vòng 1 ngày