Issue
I set my traces sample rate to 0 in my backend project, but I am still receiving new spans.
Applies To
- All SaaS Customers and Self-Hosted Users
- Performance Monitoring
Resolution
When you have set a traces sample rate in your init, performance is technically enabled no matter the actual rate you use. This is because traces will be created for your sessions and/or for your errors, even if you do not send any spans during those traces. This happens in order to support distributed tracing.
However, this also means that if you have performance enabled for your frontend, and a transaction ends up being sampled, the sampling decision will be inherited in the backend, and the backend transaction will be sampled too in order to ensure a fully tracked trace. You can read more details about inheritance here.
The solution to this is to completely turn off performance for your backend project by completely removing the traces sample rate from your init code.