Class ProbabilisticTransportActionSampler

java.lang.Object
org.opensearch.telemetry.tracing.sampler.ProbabilisticTransportActionSampler
All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler

public class ProbabilisticTransportActionSampler extends Object implements io.opentelemetry.sdk.trace.samplers.Sampler
ProbabilisticTransportActionSampler sampler samples request with action based on defined probability
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.opentelemetry.sdk.trace.samplers.Sampler
    create(TelemetrySettings telemetrySettings, Settings settings, io.opentelemetry.sdk.trace.samplers.Sampler fallbackSampler)
    Create probabilistic transport action sampler.
     
    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)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • create

      public static io.opentelemetry.sdk.trace.samplers.Sampler create(TelemetrySettings telemetrySettings, Settings settings, io.opentelemetry.sdk.trace.samplers.Sampler fallbackSampler)
      Create probabilistic transport action sampler.
      Parameters:
      telemetrySettings - the telemetry settings
      settings - the settings
      fallbackSampler - the fallback sampler
      Returns:
      the probabilistic transport action 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
    • toString

      public String toString()
      Overrides:
      toString in class Object