Interface SamplingIntent
public interface SamplingIntent
Information to make a sampling decision.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SamplingIntentcreate(long threshold, boolean thresholdReliable, io.opentelemetry.api.common.Attributes attributes, Function<io.opentelemetry.api.trace.TraceState, io.opentelemetry.api.trace.TraceState> traceStateUpdater) Returns aSamplingIntentwith the given data.io.opentelemetry.api.common.AttributesReturns any attributes to add to the span to record the sampling result.longReturns 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.booleanReturns 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 aSamplingIntentwith 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.
-