Skip to content

fix(skills): Set the trace sample rate per environment - #368

Merged
dingsdax merged 2 commits into
mainfrom
fix/production-safe-sampling
Oct 15, 2026
Merged

dingsdax merged 2 commits into
mainfrom
fix/production-safe-sampling

Conversation

@dingsdax

@dingsdax dingsdax commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why
Most docs snippets set tracesSampleRate: 1.0 for a first local run. The setup skill takes the docs' init as written and then pushes the setup to production without checking the rate, so 1.0 ships to production.

What changes

  • sdk-docs.md: keep the docs' signals, but set values that depend on the environment with a check that works where the code runs.
  • concepts/tracing.md: use the full rate locally. In production, keep the existing rate or base it on known traffic; otherwise start low, as the docs recommend. Tell the user which rate.
  • first-error-setup.md: Step 3 points to that rule. Step 5 adds the sample rate to the production checklist.
  • concepts/reduce-volume.md: health checks go to inbound filters, not a tracesSampler.
  • sentry-fix-stack-traces/references.yml: hydrates the concepts, so the new link resolves.

No numbers here: the concrete values stay in the docs. This works whichever default the docs choose.

Open decision (docs). Should docs snippets default to production values, or keep 1.0 for development and add environment or debug checks? See getsentry/sentry-docs#19957.

dingsdax and others added 2 commits October 14, 2026 19:15
Docs snippets are written for one environment. Set environment-dependent
values per environment, and pick the production trace rate from what's known.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sentry's inbound filters drop health checks, so they don't need a
tracesSampler. Samplers stay for important paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dingsdax
dingsdax marked this pull request as ready for review October 14, 2026 17:35
@dingsdax
dingsdax requested review from stephanie-anderson and removed request for stephanie-anderson October 14, 2026 17:35
@dingsdax
dingsdax merged commit 7d248bd into main Oct 15, 2026
15 checks passed
@dingsdax
dingsdax deleted the fix/production-safe-sampling branch October 15, 2026 11:45
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.

2 participants