Package io.micrometer.tracing
Interface SamplerFunction<T>
- Type Parameters:
T- type of the input, for example a request or method
- All Known Implementing Classes:
SamplerFunction.Constants
Deprecated.
scheduled for removal in 1.4.0
This API was heavily influenced by Brave. Parts of its documentation were taken
directly from Brave.
Decides whether to start a new trace based on request properties such as an HTTP path.
- Since:
- 1.0.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SamplerFunction<T>Deprecated.Always samplingSamplerFunction.static <T> SamplerFunction<T>Deprecated.Always deferringSamplerFunction.static <T> SamplerFunction<T>Deprecated.Never samplingSamplerFunction.Deprecated.Returns an overriding sampling decision for a new trace.
-
Method Details
-
deferDecision
Deprecated.Always deferringSamplerFunction.- Type Parameters:
T- type of the input, for example a request or method- Returns:
- decision deferring sampler function
-
neverSample
Deprecated.Never samplingSamplerFunction.- Type Parameters:
T- type of the input, for example a request or method- Returns:
- never sampling sampler function
-
alwaysSample
Deprecated.Always samplingSamplerFunction.- Type Parameters:
T- type of the input, for example a request or method- Returns:
- always sampling sampler function
-
trySample
Deprecated.Returns an overriding sampling decision for a new trace.- Parameters:
arg- parameter to evaluate for a sampling decision.nullinput results in anullresult- Returns:
trueto sample a new trace orfalseto deny.nulldefers the decision.
-