- java.lang.Object
-
- brave.sampler.ParameterizedSampler<P>
-
- Type Parameters:
P- The type that encloses parameters associated with a sample rate. For example, this could be a pair of http and method..
public final class ParameterizedSampler<P> extends java.lang.ObjectThis is an implementation of how to decide whether to trace a request using ordered rules. For example, you could write rules to look at an HTTP method and path, or a RabbitMQ routing key and queue name.This looks at runtime parameters to see if they
matcha rule. If all calls to a java method should have the same sample rate, considerDeclarativeSamplerinstead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParameterizedSampler.Rule<P>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <P> ParameterizedSampler<P>create(java.util.List<? extends ParameterizedSampler.Rule<P>> rules)SamplingFlagssample(P parameters)
-
-
-
Method Detail
-
create
public static <P> ParameterizedSampler<P> create(java.util.List<? extends ParameterizedSampler.Rule<P>> rules)
-
sample
public SamplingFlags sample(@Nullable P parameters)
-
-