trace-context
trace-context copied to clipboard
Add sampling constant
This draft proposal is an early proposal at solving #463
It does not directly compete with, but is overlapping with, #467
Having now specified how OpenTelemetry could use tracestate to convey r-values and p-values for itself, speaking as a member of that community, it would lead to a significantly better outcome for users and vendors if we are able to quickly and by consensus adopt a version-1 trace context format like this one combined with the proposal in #467.
Keeping in mind the original purpose of this work--which is to count spans and logs that happen in traced contexts and translate them into estimated metrics about how many associated spans and logs are happening in all contexts--we're better off with on-by-default implementations of probability sampling. The combination of these proposals leads to easier integration for span-to-metrics pipelines at a cost of 2 bytes per sampled context and 0 bytes per unsampled context.