Skip to content

With sampling rate 0, transactions are still recorded #16849

Open
@PankajSati-apl

Description

@PankajSati-apl

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

  1. Initialised Sentry with tracesSampler
  2. Added samplingRate as custom attribute
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions