public interface SamplingIntent
Information to make a sampling decision.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(long threshold, boolean thresholdReliable, io.opentelemetry.api.common.Attributes attributes, Function<io.opentelemetry.api.trace.TraceState,io.opentelemetry.api.trace.TraceState> traceStateUpdater)
    Returns a SamplingIntent with the given data.
    io.opentelemetry.api.common.Attributes
    Returns any attributes to add to the span to record the sampling result.
    long
    Returns the sampling threshold value.
    Function<io.opentelemetry.api.trace.TraceState,io.opentelemetry.api.trace.TraceState>
    Returns a function to apply to the tracestate of the span to possibly update it.
    boolean
    Returns whether the threshold can be reliably used for Span-to-Metrics estimation.
  • Method Details

    • create

      static SamplingIntent create(long threshold, boolean thresholdReliable, io.opentelemetry.api.common.Attributes attributes, Function<io.opentelemetry.api.trace.TraceState,io.opentelemetry.api.trace.TraceState> traceStateUpdater)
      Returns a SamplingIntent with the given data.
    • getThreshold

      long getThreshold()
      Returns the sampling threshold value. A lower threshold increases the likelihood of sampling.
    • isThresholdReliable

      boolean isThresholdReliable()
      Returns whether the threshold can be reliably used for Span-to-Metrics estimation.
    • getAttributes

      io.opentelemetry.api.common.Attributes getAttributes()
      Returns any attributes to add to the span to record the sampling result.
    • getTraceStateUpdater

      Function<io.opentelemetry.api.trace.TraceState,io.opentelemetry.api.trace.TraceState> getTraceStateUpdater()
      Returns a function to apply to the tracestate of the span to possibly update it.