Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete the TraceIdRatio specification #1826

Open
carlosalberto opened this issue Jul 23, 2021 · 2 comments
Open

Complete the TraceIdRatio specification #1826

carlosalberto opened this issue Jul 23, 2021 · 2 comments
Assignees
Labels
area:sampling Related to trace sampling area:sdk Related to the SDK spec:trace Related to the specification/trace directory

Comments

@carlosalberto
Copy link
Contributor

carlosalberto commented Jul 23, 2021

As part of the Sampling SIG (and as reported as part of #1819), TraceIdRatio is so far the preferred default sampler. However, related questions have arose, in order to complete such sampler specification:

  1. Use sufficiently random trace IDs, specify how to evaluate the ratio test directly from TraceID bits
  2. Propagate a new uniform random number in the range (0, 1] in the W3C tracestate to facilitate the ratio test
  3. Specify that TraceIDs need not be "very random" but dictate the use of a standard hashing algorithm.

One detail to be aware of here is that some vendors may be providing their existing ids, so we have to make sure this works in all scenarios.

cc @jmacd @tedsuo @anuraaga @yurishkuro

@carlosalberto carlosalberto added the spec:trace Related to the specification/trace directory label Jul 23, 2021
@carlosalberto carlosalberto added area:sampling Related to trace sampling area:sdk Related to the SDK labels Jul 23, 2021
@Oberon00 Oberon00 changed the title Complete the TraceIdRation specification Complete the TraceIdRatio specification Jul 23, 2021
@yurishkuro
Copy link
Member

@carlosalberto wrote:
One detail to be aware of here is that some vendors may be providing their existing ids, so we have to make sure this works in all scenarios.

I agree with this - we cannot rely on trace-id to be completely random.

Of course there's always an option to support all 3 solutions via configuration, because some of them may be more palatable / suitable for different sites. For example, in my company option 2 would be very difficult to deploy, as many services are overly sensitive (i.e. can demonstrate numeric evidence of perf regression) to any extra payloads on the wire.

@jmacd
Copy link
Contributor

jmacd commented Jul 29, 2021

Re: sensitivity to extra payload

This was why my original proposal in open-telemetry/oteps#168 used traceparent, because there we can get this support on-by-default for 3 bytes per context.

To me, the hashing option is the most difficult to specify and I would eliminate it. I can accept either a random TraceID or a tracestate entry, supporting both is within reason just a lot harder to specify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sampling Related to trace sampling area:sdk Related to the SDK spec:trace Related to the specification/trace directory
Projects
None yet
Development

No branches or pull requests

3 participants