T - type of the input, for example a request or methodpublic interface SamplerFunction<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
SamplerFunction.Constants
Constant
SamplerFunctions. |
| Modifier and Type | Method and Description |
|---|---|
static <T> SamplerFunction<T> |
alwaysSample()
Always sampling
SamplerFunction. |
static <T> SamplerFunction<T> |
deferDecision()
Always deferring
SamplerFunction. |
static <T> SamplerFunction<T> |
neverSample()
Never sampling
SamplerFunction. |
Boolean |
trySample(T arg)
Returns an overriding sampling decision for a new trace.
|
@Nullable Boolean trySample(@Nullable T arg)
arg - parameter to evaluate for a sampling decision. null input
results in a null resulttrue to sample a new trace or false to deny. null
defers the decision.static <T> SamplerFunction<T> deferDecision()
SamplerFunction.T - type of the input, for example a request or methodstatic <T> SamplerFunction<T> neverSample()
SamplerFunction.T - type of the input, for example a request or methodstatic <T> SamplerFunction<T> alwaysSample()
SamplerFunction.T - type of the input, for example a request or methodCopyright © 2021 Pivotal Software, Inc.. All rights reserved.