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
OpenTelemetryAutoConfiguration uses a simple probability sampler.
With this strategy we can potentialy (if probability is not set to 100%) get inconsistent trace because some services decide not to sample their spans.
More over a brave sampler has parent-based behavior by default.
From open telemetry sampler documentation:
/**
* Returns a new TraceIdRatioBased {@link Sampler}. The ratio of sampling a trace is equal to that
* of the specified ratio.
*
* <p>The algorithm used by the {@link Sampler} is undefined, notably it may or may not use parts
* of the trace ID when generating a sampling decision. Currently, only the ratio of traces that
* are sampled can be relied on, not how the sampled traces are determined. As such, it is
* recommended to only use this {@link Sampler} for root spans using {@link
* Sampler#parentBased(Sampler)}.
*
* @param ratio The desired ratio of sampling. Must be within [0.0, 1.0].
* @return a new TraceIdRatioBased {@link Sampler}.
* @throws IllegalArgumentException if {@code ratio} is out of range
*/
static Sampler traceIdRatioBased(double ratio) {
return TraceIdRatioBasedSampler.create(ratio);
}
wilkinsona
changed the title
OpenTelemetryAutoConfiguration should user parent-based sampler by default
OpenTelemetryAutoConfiguration should use parent-based sampler by default
Jan 13, 2023
Yes, the proposed change is sensible. I suspect that's the behavior we intended and we merely missed that it was not the actual behavior. /cc @marcingrzejszczak@jonatan-ivanov
OpenTelemetryAutoConfiguration
uses a simple probability sampler.With this strategy we can potentialy (if probability is not set to 100%) get inconsistent trace because some services decide not to sample their spans.
More over a brave sampler has parent-based behavior by default.
From open telemetry sampler documentation:
I think it would be nice if you replace
with
The text was updated successfully, but these errors were encountered: