Configure Sentry trace sample rate and dynamic sampling to control which spans are retained
domain: docs.sentry.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Set `tracesSampleRate` in the SDK initialization to a fixed value between 0 and 1, or provide a `tracesSampler` function for content-based sampling decisions
In Sentry organization settings, review or enable Dynamic Sampling, which re-biases retention at ingest across your organization's traffic patterns
Choose default mode (org-wide target rate) or advanced mode (per-project fixed rates) depending on how much control you need over individual projects
Review the Dynamic Sampling project preview to see the effect of settings before committing
Tune per-project Dynamic Sampling priorities (e.g. favoring latest release or low-volume projects) under project performance settings
Confirm error events are unaffected, since Dynamic Sampling applies to spans/transactions, not error sampling
Known gotchas
Dynamic Sampling is a server-side, paid-plan feature — the client-side `tracesSampleRate`/`tracesSampler` still control what's sent to Sentry in the first place
The sample rate applied to a distributed trace is determined by the trace's originating project, not each downstream service's own configuration
Switching from advanced mode back to default mode can be irreversible for previously configured per-project rates, so confirm before changing modes
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?