Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
9.28.1
Framework Version
18.3.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
Sentry.init({
...
tracesSampler(_) {
return getCurrentSamplingRate(); // Reads global variable, updated when user data is initialized. We want to only record the paid users
},
...
})
Steps to Reproduce
- Initialised Sentry with
tracesSampler
- Added
samplingRate as custom attribute
- Observed that transactions with sampling Rate 0 are reported in Sentry
Expected Result
Transactions with sampling Rate 0 should be dropped
Actual Result
Transactions with sampling Rate 0 are getting reported to Sentry
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
9.28.1
Framework Version
18.3.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
tracesSamplersamplingRateas custom attributeExpected Result
Transactions with sampling Rate 0 should be dropped
Actual Result
Transactions with sampling Rate 0 are getting reported to Sentry