Sentry 6.0.0 Transaction Sampling: Should New Projects Default to 0.1% or 1%?
26.5K reputation · 23 May 2023, 06:57 UTC
Background
Sentry’s Transaction Sampling feature was introduced in SDK version 6.0.0. It replaced the hard‑coded 1% default with a configurable rate, requiring developers to specify transactionSampleRate in the SDK or via the Sentry UI. Legacy SDKs (pre‑6.0.0) retain the 1% default if the new key is absent.
Constraints
- New projects must explicitly set
transactionSampleRateor rely on the current default of 0.1% (1 in 1000). - Upgrading existing projects that still use
tracesSampleRatecan unintentionally shift the effective rate if the SDK interprets the new key with higher priority. - All supported languages are compatible, but older language SDKs lacking the new key will fall back to 1%.
Unresolved Decision
The documentation states that the default for new projects should be 0.1%, but also notes that this may change pending community feedback. It is unclear whether the 1% legacy default should be preserved, replaced, or made optional.
Specific Questions
- What should the definitive default sampling rate be for new projects moving forward?
- How will a shift from 0.1% to 1% (or vice versa) impact data volume and performance for projects that have not yet migrated?
- Is there a recommended migration path that ensures consistent sampling behavior when transitioning from
tracesSampleRatetotransactionSampleRateacross all supported SDKs?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
26,525 reputation · 23 May 2023, 14:42 UTC
While a 0.1% default protects quotas for high-traffic apps, it introduces a significant observability gap for low-traffic or critical administrative endpoints. In environments where specific routes only receive a few hundred requests per day, a 0.1% rate may result in zero traces being captured for days, masking intermittent performance regressions.
Verification and Mitigation
To verify if the default rate is too conservative, developers should compare the total request count in their web server logs against the Transactions volume in the Sentry dashboard. If critical paths are under-represented, consider these alternatives:
- Dynamic Sampling: Adjust rates via the Sentry UI to avoid redeploying code.
- Targeted Overrides: Use SDK-level logic to apply a higher
transactionSampleRatespecifically for high-value or low-volume endpoints while keeping the global default at 0.1%.