Tracing: add support for strictTraceContinuation
Problem Statement
When a 3rd party access our API's, it can set headers like "Traceparent" and "Tracestate", which trigger trace propagation on our backend, even though the trace sample rate is set to 0%. When navigating to solve the issue by configuring the SDK, I fumble on this https://develop.sentry.dev/sdk/telemetry/traces/#stricttracecontinuation, but I could find an equivalent for the PHP sdk, it was only available on Python or Javascript. I am missing something ?
Solution Brainstorm
This option should be able to ignore current trace propagation if sentry org are different base on the headers and the DSN set in the SDK.
traces_sample_rate: 0 is different to traces_sample_rate: null. When setting null, we ignore any incoming traces, regardless their sample decision.
The feature you linked to is currently not available in any SDK.
Thank you for the clarification ! So I would have a look at the trace_propagation_targets attribute ? I know it applies to outgoing requests, but does it ignore incoming requests already tagged with traces header ? I couldn't find anything in the documentation for that
You can overwrite the parent sampling decision with a traces_sampler.
Besides this, we will ship strict_trace_continuation first in the PHP SDK, likely this week.