Package codes.grow.packages.jaeger
Class JaegerRemoteSampler.Builder
java.lang.Object
codes.grow.packages.jaeger.JaegerRemoteSampler.Builder
- Enclosing class:
JaegerRemoteSampler
Builder of a
JaegerRemoteSampler.-
Method Summary
Modifier and TypeMethodDescriptionautoStart(boolean autoStart) Whetherbuild()starts polling (default true).build()Validates and builds (and starts, unlessautoStart(false)) the sampler.config(JaegerConfig config) Sets the transport settings (timeouts, retries, TLS, proxy, headers, token, samplingUrl).initialSamplingRate(double rate) Sets the probability used until the first strategy arrives (default 0.001).onError(Consumer<JaegerException> onError) Receives poll errors (the last good strategy stays in use).onUpdate(Consumer<JaegerSamplingStrategy> onUpdate) Called after each successful poll.pollInterval(Duration pollInterval) Sets the poll interval (default 1 min).samplingUrl(String samplingUrl) Sets the sampling endpoint (default:config.samplingUrl()).
-
Method Details
-
samplingUrl
Sets the sampling endpoint (default:config.samplingUrl()).- Parameters:
samplingUrl- URL- Returns:
- this builder
-
pollInterval
Sets the poll interval (default 1 min).- Parameters:
pollInterval- positive interval,null= default- Returns:
- this builder
-
initialSamplingRate
Sets the probability used until the first strategy arrives (default 0.001).- Parameters:
rate- 0..1- Returns:
- this builder
-
config
Sets the transport settings (timeouts, retries, TLS, proxy, headers, token, samplingUrl).- Parameters:
config- configuration- Returns:
- this builder
-
onError
Receives poll errors (the last good strategy stays in use).- Parameters:
onError- callback- Returns:
- this builder
-
onUpdate
Called after each successful poll.- Parameters:
onUpdate- callback- Returns:
- this builder
-
autoStart
Whetherbuild()starts polling (default true).- Parameters:
autoStart- start at once- Returns:
- this builder
-
build
Validates and builds (and starts, unlessautoStart(false)) the sampler.- Returns:
- the sampler
- Throws:
ConfigException- for a blank service, a bad URL, a non-positive interval or an initial rate outside 0..1
-