Skip to main content

[Laravel] Why are transactions still reported after setting traces_sample_rate to 0.0?

Issue

Despite setting traces_sample_rate to 0.0, Sentry still receives transactions from my Laravel application. I want to completely disable transactions and stop all tracing.

Applies To

  • Laravel SDK users

Resolution

Setting traces_sample_rate to 0.0 does not fully disable tracing. It sets the local sample rate to 0%, but the SDK still inherits a sampling decision from an incoming trace. If an upstream service, such as your frontend, sends sentry-trace and baggage headers with a positive sampling decision, the Laravel SDK continues that trace and reports the transaction.

Sentry applies sampling in this order: traces_sampler, then the inherited parent decision, then traces_sample_rate. When you use a sample rate without a sampler, the SDK always inherits the parent decision.

To fully disable transactions, choose one option, ordered by how completely each stops tracing:

  • Set traces_sample_rate to null, or leave SENTRY_TRACES_SAMPLE_RATE unset. This is the default and disables tracing, so the SDK exits early and does not inherit incoming decisions.

  • Keep tracing configured but drop everything: define a traces_sampler that returns 0.0 for all transactions, including inherited ones.

Did this answer your question?