Repository navigation
chore(api): revert the region-move tracing sampler - #7390
Conversation
The measurement is done — Vercel Observability put the p50 TTFB at 293ms on iad1 against 42ms on pdx1 — and the sampler was never what produced it. It collected zero spans across twenty minutes of production traffic while errors flowed normally, host-service traced fine and quota sat clear. Reverting rather than leaving it: config that looks like it samples and does not is worse than none. The note records the gap so the next attempt starts from "this app cannot be traced" rather than from a sample rate. Claude-Session: https://claude.ai/code/session_01Ho5jMfrUs1e65svM8M2Hc6
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe API Sentry configuration removes the ChangesAPI tracing configuration
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to API span tracing is intentionally disabled after the measurement period. No unresolved merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the change, measurement results, and unresolved tracing issue. However, it omits the required “How I tested it” section and checklist, and it uses “Why” instead of the template’s “What & why” heading.
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Biome (2.5.10)apps/api/sentry.server.config.tsBiome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins. 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 Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Why
The measurement #7388 existed to take is done. Vercel Observability, grouped by
function_region:iad1pdx1But the sampler was never what produced that. It collected zero spans across twenty minutes of live production traffic — while errors flowed normally,
host-servicetraced fine, quota sat clear, and the config was live and correct onba4bbec87.Why revert instead of keeping a trickle
"Keep a small sample" isn't available. The sampler doesn't collect a small number of spans, it collects none — so leaving it in place gives config that looks like it samples and doesn't. The next person to read this file would believe it.
Reverting restores the honest state: tracing is off, and off is a thing you can reason about.
What the note preserves
The comment now records that a narrow sampler was tried and produced nothing, so the next attempt starts from "this app cannot currently be traced, cause unknown" rather than from picking a sample rate. That's the actual finding, and it's worth chasing on its own merits — an untraceable API makes the next production mystery much harder than this one was.
Ruled out so far: quota, org-level span ingestion, DSN rate limits, a stale deploy, and
namematching (Sentry's docs confirmnameis unparametrized at sampling time, but all three route substrings match that form anyway). Suspect but unconfirmed:@sentry/nextjs10.68 server instrumentation under Next.js 16.3 + Turbopack.https://claude.ai/code/session_01Ho5jMfrUs1e65svM8M2Hc6
Summary by cubic
Reverts the region-move tracing sampler now that the measurement is done, restoring the previous state where tracing is off. The sampler collected zero spans across 20 minutes of production traffic, so leaving it would have implied sampling works when it doesn't. The comment now records the failed attempt and notes that the app currently cannot be traced for unknown reasons.
Written for commit f6ca02d. Summary will update on new commits.
Summary by CodeRabbit