relay
relay copied to clipboard
Accept DSC as item header
Trace-based sampling decisions take their input from the "trace" envelope header a.k.a. DynamicSamplingContext.
One of the DSC fields in "transaction". For span streaming, SDKs might send multiple spans with different segment names. In order to apply consistent sampling we need to either
- Force SDKs to put spans with different DSCs into different envelopes.
- Start accepting DSCs as item headers, and use it in the sampling decision (with fallback to envelope header). Because each item's DSC might have a different root project aka trace project aka sampling state, we would need to split up the envelope by root project.
This is required for span streaming but not "span envelopes", so I'm lowering the priority for now.
Currently SDKs are forced to send different envelopes per DSC.
Longterm we can allow the DSC as a local item header, but this is currently not actively planned.