Skip to content

chore(api): revert the region-move tracing sampler - #7390

Merged
saddlepaddle merged 1 commit into
mainfrom
chore/revert-region-tracing
Sep 10, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
chore/revert-region-tracing

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The measurement #7388 existed to take is done. Vercel Observability, grouped by function_region:

p50 TTFB
iad1 293.5ms
pdx1 41.8ms

But the sampler was never what produced that. It collected zero spans across twenty minutes of live production traffic — while errors flowed normally, host-service traced fine, quota sat clear, and the config was live and correct on ba4bbec87.

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 name matching (Sentry's docs confirm name is unparametrized at sampling time, but all three route substrings match that form anyway). Suspect but unconfirmed: @sentry/nextjs 10.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.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Disabled span tracing for API routes, including desktop version checks, Gmail push notifications, and tRPC requests.

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
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0a78b3c5-954b-48a7-bcb8-bcb7c88141ab

📥 Commits

Reviewing files that changed from the base of the PR and between ba4bbec and f6ca02d.

📒 Files selected for processing (1)
  • apps/api/sentry.server.config.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The API Sentry configuration removes the tracesSampler callback. Without tracesSampleRate or tracesSampler, span tracing is disabled for all API routes.

Changes

API tracing configuration

Layer / File(s) Summary
Disable route-specific sampling
apps/api/sentry.server.config.ts
Removes sampling rates for desktop/version, gmail/push, and trpc. Sentry no longer samples API spans.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to f6ca0

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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… Add a “How I tested it” section with validation steps and results. Add the required checklist and mark each applicable item. Rename “Why” to “What & why” or include the full template heading.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the API tracing sampler revert and follows conventional commit format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/revert-region-tracing

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.10)
apps/api/sentry.server.config.ts

Biome 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit 8c4f9a8 into main Sep 10, 2026
20 checks passed

This branch was previously deployed

1 inactive deployment
preview — f6ca02d0 Deployed Sep 10, 2026 by saddlepaddle via Deploy Docs #9541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant