Class CompositeSampler
java.lang.Object
io.opentelemetry.sdk.extension.incubator.trace.samplers.CompositeSampler
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler
public final class CompositeSampler
extends Object
implements io.opentelemetry.sdk.trace.samplers.Sampler
A sampler that uses a
ComposableSampler to make its sampling decisions while handlign
tracestate.-
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.sdk.trace.samplers.SamplingResultshouldSample(io.opentelemetry.context.Context parentContext, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks) toString()static io.opentelemetry.sdk.trace.samplers.Samplerwrap(ComposableSampler delegate) Returns a new compositeSamplerthat delegates to the givenComposableSampler.
-
Method Details
-
wrap
Returns a new compositeSamplerthat delegates to the givenComposableSampler. -
shouldSample
public io.opentelemetry.sdk.trace.samplers.SamplingResult shouldSample(io.opentelemetry.context.Context parentContext, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks) - Specified by:
shouldSamplein interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-
getDescription
- Specified by:
getDescriptionin interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-
toString
-