Class JaegerRemoteSamplerBuilder

java.lang.Object
io.opentelemetry.sdk.extension.trace.jaeger.sampler.JaegerRemoteSamplerBuilder

public final class JaegerRemoteSamplerBuilder extends Object
A builder for JaegerRemoteSampler.
  • Method Details

    • 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 "http://localhost:14250".
    • setTrustedCertificates

      public JaegerRemoteSamplerBuilder setTrustedCertificates(byte[] trustedCertificatesPem)
      Sets trusted certificate.
    • setClientTls

      public JaegerRemoteSamplerBuilder setClientTls(byte[] privateKeyPem, byte[] certificatePem)
      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

      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.
    • setChannel

      @Deprecated public JaegerRemoteSamplerBuilder setChannel(io.grpc.ManagedChannel channel)
      Deprecated.
      Use setEndpoint(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 over setEndpoint(String) if both are called.
    • build

      public JaegerRemoteSampler build()
      Returns:
      the remote sampler instance.