Class RateLimitingSampler
java.lang.Object
brave.sampler.Sampler
io.micrometer.tracing.brave.sampler.RateLimitingSampler
public class RateLimitingSampler
extends brave.sampler.Sampler
The rate-limited sampler allows you to choose an amount of traces to accept on a
per-second interval. The minimum number is 0 and the max is 2,147,483,647 (max int).
You can read more about it in RateLimitingSampler
- Since:
- 1.0.0
-
Field Summary
Fields inherited from class brave.sampler.Sampler
ALWAYS_SAMPLE, NEVER_SAMPLE
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimitingSampler
(Supplier<Integer> rate) Creates a new instance ofRateLimitingSampler
. -
Method Summary
Methods inherited from class brave.sampler.Sampler
create
-
Constructor Details
-
RateLimitingSampler
Creates a new instance ofRateLimitingSampler
.- Parameters:
rate
- supplier of rate
-
-
Method Details
-
isSampled
public boolean isSampled(long traceId) - Specified by:
isSampled
in classbrave.sampler.Sampler
-