dd-trace-rb
dd-trace-rb copied to clipboard
Sampling-Propagation:Export/import sampling mechanism through distributed trace tags
Follows up from #2282.
This PR ensures the TraceOperation#sampling_mechanism
populated in #2282 is injected and extracted during distributed tracing. This happens through the _dd.p.dm
tag: e.g. sampling_mechanism=1
becomes _dd.p.dm=-1
The seemly minus
sign is due to this field being historically comprised of two parts, separated by a dash. The first part is temporarily under review and might not be implemented as part of _dd.p.dm
in the future, but instead as a separate field. Alas, we must still support this format, as this format is understood by other tracer languages already deployed in production environments.