Class JaegerRemoteSamplerBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.extension.trace.jaeger.sampler.JaegerRemoteSamplerBuilder
-
public final class JaegerRemoteSamplerBuilder extends Object
A builder forJaegerRemoteSampler.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JaegerRemoteSamplerbuild()Builds theJaegerRemoteSampler.JaegerRemoteSamplerBuildersetChannel(io.grpc.ManagedChannel channel)Sets the managed channel to use when communicating with the backend.JaegerRemoteSamplerBuildersetEndpoint(String endpoint)Sets the Jaeger endpoint to connect to.JaegerRemoteSamplerBuildersetInitialSampler(io.opentelemetry.sdk.trace.samplers.Sampler initialSampler)Sets the initial sampler that is used before sampling configuration is obtained.JaegerRemoteSamplerBuildersetPollingInterval(int interval, TimeUnit unit)Sets the polling interval for configuration updates.JaegerRemoteSamplerBuildersetPollingInterval(Duration interval)Sets the polling interval for configuration updates.JaegerRemoteSamplerBuildersetServiceName(String serviceName)Sets the service name to be used by this exporter.
-
-
-
Method Detail
-
setServiceName
public JaegerRemoteSamplerBuilder setServiceName(String serviceName)
Sets the service name to be used by this exporter. Required.- Parameters:
serviceName- the service name.- Returns:
- this.
-
setEndpoint
public JaegerRemoteSamplerBuilder setEndpoint(String endpoint)
Sets the Jaeger endpoint to connect to. If unset, defaults to "localhost:14250".
-
setChannel
public JaegerRemoteSamplerBuilder setChannel(io.grpc.ManagedChannel channel)
Sets the managed channel to use when communicating with the backend. Takes precedence oversetEndpoint(String)if both are called.
-
setPollingInterval
public JaegerRemoteSamplerBuilder setPollingInterval(int interval, TimeUnit unit)
Sets the polling interval for configuration updates. If unset, defaults to 60000ms. Must be positive.
-
setPollingInterval
public JaegerRemoteSamplerBuilder setPollingInterval(Duration interval)
Sets the polling interval for configuration updates. If unset, defaults to 60000ms.
-
setInitialSampler
public JaegerRemoteSamplerBuilder setInitialSampler(io.opentelemetry.sdk.trace.samplers.Sampler initialSampler)
Sets the initial sampler that is used before sampling configuration is obtained. If unset, defaults to a parent-based ratio-based sampler with a ratio of 0.001.
-
build
public JaegerRemoteSampler build()
Builds theJaegerRemoteSampler.- Returns:
- the remote sampler instance.
-
-