Repository navigation
Pin production SENTRY_TRACES_SAMPLE_RATE to 0 now that OTLP export delivers traces - #906
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughProduction pins ChangesSentry tracing configuration
Worker environment typing updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-906.kody-a99.workers.dev Worker: Mocks:
|
What
Follow-up to #905. The
sentry-otlp-tracesexport destination is confirmed delivering (Sentry's spans dataset forkody-cloudflareshows Cloudflare-exported spans with no SDK attribution), so this pinsSENTRY_TRACES_SAMPLE_RATE: 0as a JSON-number Wrangler var in the production environment to stop the in-Worker Sentry SDK from producing a duplicate set of traces. Error capture is unaffected.Also corrects the docs: they previously said to set a Worker secret, but
buildSentryOptionsreads the raw runtime env and only honorstypeof === 'number'— a string secret"0"would be silently ignored. The var must be a JSON number, which is what production now sets.worker-configuration.d.tsis regenerated (npm run generate-types).Verification
npm run typecheckpasses with the regenerated types (literal0merges withAppEnv'snumber | undefined).npx wrangler deploy --dry-run --env productionshowsenv.SENTRY_TRACES_SAMPLE_RATE (0)bound as a number.System recap — composes existing primitives (low risk)
Mode: recap · Base:
main@0d2a36fa· Head: branch tipClassification: composes — one production Wrangler var plus doc corrections and regenerated types; no primitives added or changed, no runtime code paths modified.
Primitives touched
None — the Sentry SDK already supported this var; production config now sets it.
Before / after
Summary by CodeRabbit
New Features
Documentation