Class JaegerRemoteSamplerBuilder
java.lang.Object
io.opentelemetry.sdk.extension.trace.jaeger.sampler.JaegerRemoteSamplerBuilder
A builder for
JaegerRemoteSampler.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theJaegerRemoteSampler.setChannel(io.grpc.ManagedChannel channel) Deprecated.setClientTls(byte[] privateKeyPem, byte[] certificatePem) Sets the client key and the certificate chain to use for verifying client when TLS is enabled.setEndpoint(String endpoint) Sets the Jaeger endpoint to connect to.setInitialSampler(io.opentelemetry.sdk.trace.samplers.Sampler initialSampler) Sets the initial sampler that is used before sampling configuration is obtained.setPollingInterval(int interval, TimeUnit unit) Sets the polling interval for configuration updates.setPollingInterval(Duration interval) Sets the polling interval for configuration updates.setServiceName(String serviceName) Sets the service name to be used by this exporter.setSslContext(SSLContext sslContext, X509TrustManager trustManager) Sets the "bring-your-own" SSLContext for use with TLS.setTrustedCertificates(byte[] trustedCertificatesPem) Sets trusted certificate.
-
Method Details
-
setServiceName
Sets the service name to be used by this exporter. Required.- Parameters:
serviceName- the service name.- Returns:
- this.
-
setEndpoint
Sets the Jaeger endpoint to connect to. If unset, defaults to "http://localhost:14250". -
setTrustedCertificates
Sets trusted certificate. -
setClientTls
Sets the client key and the certificate chain to use for verifying client when TLS is enabled. The key must be PKCS8, and both must be in PEM format.- Since:
- 1.24.0
-
setSslContext
public JaegerRemoteSamplerBuilder setSslContext(SSLContext sslContext, X509TrustManager trustManager) Sets the "bring-your-own" SSLContext for use with TLS. Users should call this _or_ set raw certificate bytes, but not both. -
setPollingInterval
Sets the polling interval for configuration updates. If unset, defaults to 60000ms. Must be positive. -
setPollingInterval
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. -
setChannel
Deprecated.UsesetEndpoint(String). If you have a use case not satisfied by the methods on this builder, please file an issue to let us know what it is.Sets the managed channel to use when communicating with the backend. Takes precedence oversetEndpoint(String)if both are called. -
build
Builds theJaegerRemoteSampler.- Returns:
- the remote sampler instance.
-
setEndpoint(String).