Class 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 a TracerProvider during static initialization and set a Sampler delegate during runtime initialization.
    • Constructor Detail

      • LateBoundSampler

        public LateBoundSampler()
    • Method Detail

      • setSamplerDelegate

        public void setSamplerDelegate​(io.opentelemetry.sdk.trace.samplers.Sampler delegate)
        Set the actual Sampler to use as the delegate.
        Parameters:
        delegate - Properly constructed Sampler.
      • 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:
        shouldSample in interface io.opentelemetry.sdk.trace.samplers.Sampler
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface io.opentelemetry.sdk.trace.samplers.Sampler