Class LateBoundSampler
- java.lang.Object
-
- io.quarkus.opentelemetry.runtime.tracing.LateBoundSampler
-
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler
public class LateBoundSampler extends Object implements io.opentelemetry.sdk.trace.samplers.Sampler
Class enabling Quarkus to instantiate aTracerProviderduring static initialization and set aSamplerdelegate during runtime initialization.
-
-
Constructor Summary
Constructors Constructor Description LateBoundSampler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()voidsetSamplerDelegate(io.opentelemetry.sdk.trace.samplers.Sampler delegate)Set the actualSamplerto use as the delegate.io.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)
-
-
-
Method Detail
-
setSamplerDelegate
public void setSamplerDelegate(io.opentelemetry.sdk.trace.samplers.Sampler delegate)
Set the actualSamplerto use as the delegate.- Parameters:
delegate- Properly constructedSampler.
-
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
public String getDescription()
- Specified by:
getDescriptionin interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-
-