Repository navigation
fix(skills): Set the trace sample rate per environment - #368
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 14, 2026 17:35
dingsdax
requested review from
stephanie-anderson
and removed request for
stephanie-anderson
October 14, 2026 17:35
evanpurkhiser
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Most docs snippets set
tracesSampleRate: 1.0for a first local run. The setup skill takes the docs'initas written and then pushes the setup to production without checking the rate, so1.0ships 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 atracesSampler.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.0for development and add environment or debug checks? See getsentry/sentry-docs#19957.