-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Spec Conformance Review: Built-in samplers #1651
Comments
Built-in samplers
opentelemetry-go/sdk/trace/provider.go Line 69 in 90bd4ab
|
AlwaysOnopentelemetry-go/sdk/trace/sampling.go Lines 122 to 128 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Line 113 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Line 119 in 90bd4ab
|
AlwaysOffopentelemetry-go/sdk/trace/sampling.go Lines 143 to 146 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Line 134 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Line 140 in 90bd4ab
|
TraceIdRatioBasedopentelemetry-go/sdk/trace/sampling.go Lines 89 to 107 in 90bd4ab
It does: opentelemetry-go/sdk/trace/sampling.go Lines 71 to 83 in 90bd4ab
I'm not sure if the specification is stating this needs to be the static string opentelemetry-go/sdk/trace/sampling.go Line 105 in 90bd4ab
Otherwise, we need to clarify to what precision we should be representing the ratio as. I've opened this issue in the specification repository to clarify. Tracking our follow on to that issues' resolution here.
It is: opentelemetry-go/sdk/trace/sampling.go Lines 73 to 78 in 90bd4ab
if the trace ID is within a certain bound it will be sampled otherwise it will not. That bound does not change for the entirety of the samplers life.
Trace ID is the only parameter used in the decision, regardless of the things listed.
The hash algorithm used looks at the first 8 bytes of a trace ID bit shifted right by one. This value is evaluated as a uint64 against the fraction of all numbers a uint64 can represent ([0, (2^64)-1]). If it is inclusive of this fraction it is sampled, otherwise it is dropped. opentelemetry-go/sdk/trace/sampling.go Lines 72 to 73 in 90bd4ab
The fractional cutoff the sampler uses is inclusive of all samplers with fractions smaller than it. opentelemetry-go/sdk/trace/sampling.go Line 104 in 90bd4ab
|
ParentBasedopentelemetry-go/sdk/trace/sampling.go Lines 148 to 162 in 90bd4ab
Root is a required argument of this samplers creation function: opentelemetry-go/sdk/trace/sampling.go Line 157 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Lines 200 to 203 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Lines 215 to 219 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Lines 231 to 234 in 90bd4ab
opentelemetry-go/sdk/trace/sampling.go Lines 246 to 250 in 90bd4ab
|
The text was updated successfully, but these errors were encountered: