You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also wanted to understand even if the trace is not sampled if the rv should be passed to the subsequent system, may be the distributed system might want to be able to use this rv value to may be sample at its end.
So for example may be the sampling percentage for the trace in the current system is 1% but the next system it is 5%, so shouldn't rv be passed ahead so that the other system doesn't need to compute the same?
The text was updated successfully, but these errors were encountered:
The rv value is optional. When it is not present, the lower 56 bits of the TraceID are the source of randomness. See "Explicit trace randomness" and "Presumption of TraceID randomness" in Randomness requirements .... Since TraceID is always propagated, repeating the 14 hex characters for rv is not efficient, if the values are the same.
The rv value is supposed to be set for the ROOT span by all Consistent Probability Samplers when they do not see the Random flag in TraceFlags. However, current versions of OTel SDK do not generate this flag, and the samplers just assume that TraceID has sufficient randomness. Which is formally not correct.
Once rv gets into tracestate, it is propagated to all child spans, even if some spans are not sampled.
Understood that this is the expected behaviour. We can close the issue however I would want to also quickly highlight my use-case.
So I have to sample some other logs in my system, but I want these logs to be connectable to my traces. Hence I thought that if I use the same rv value as my trace is using, then I can achieve this consistently. However every distributed system had to have this computation. But I think it's not a very difficult logic as well to implement, I am using like
long rv = Long.parseLong(traceId, traceId.length() - 14, traceId.length(), 16)
Component(s)
samplers
What happened?
Description
rv value is not set in the tracestate
Steps to Reproduce
use consistent56 sampling for your traces
Expected Result
rv should be set and passed in the tracestate but it is not
Actual Result
rv value is not passed
Component version
1.39.0-alpha
Log output
Request headers : {"Traceparent": "00-55bc3cfaa3eeeafcd2c03a7f68b83799-cc5a2666503c8e6b-01", "Tracestate": "ot=th:8"}
Additional context
I also wanted to understand even if the trace is not sampled if the rv should be passed to the subsequent system, may be the distributed system might want to be able to use this rv value to may be sample at its end.
So for example may be the sampling percentage for the trace in the current system is 1% but the next system it is 5%, so shouldn't rv be passed ahead so that the other system doesn't need to compute the same?
The text was updated successfully, but these errors were encountered: