Package brave.rpc
Class RpcRuleSampler.Builder
java.lang.Object
brave.rpc.RpcRuleSampler.Builder
- Enclosing class:
- RpcRuleSampler
public static final class RpcRuleSampler.Builder extends Object
- Since:
- 5.8
-
Method Summary
Modifier and Type Method Description RpcRuleSampler
build()
RpcRuleSampler.Builder
putAllRules(RpcRuleSampler sampler)
Adds or replaces all rules in this sampler with those of the input.RpcRuleSampler.Builder
putRule(Matcher matcher, Sampler sampler)
Adds or replaces the sampler for the matcher.
-
Method Details
-
putAllRules
Adds or replaces all rules in this sampler with those of the input.- Since:
- 5.8
-
putRule
Adds or replaces the sampler for the matcher.Ex.
import static brave.rpc.RpcRequestMatchers.methodEquals; builder.putRule(methodEquals("Report"), RateLimitingSampler.create(10));
- Since:
- 5.8
-
build
-