Class AwsXrayRemoteSamplerBuilder

java.lang.Object
io.opentelemetry.contrib.awsxray.AwsXrayRemoteSamplerBuilder

public final class AwsXrayRemoteSamplerBuilder extends Object
A builder for AwsXrayRemoteSampler.
  • Method Details

    • setEndpoint

      public AwsXrayRemoteSamplerBuilder setEndpoint(String endpoint)
      Sets the endpoint for the TCP proxy to connect to. This is the address to the port on the OpenTelemetry Collector configured for proxying X-Ray sampling requests. If unset, defaults to "http://localhost:2000".
    • setPollingInterval

      public AwsXrayRemoteSamplerBuilder setPollingInterval(Duration delay)
      Sets the polling interval for configuration updates. If unset, defaults to 300Ls. Must be positive.
    • setPollingInterval

      public AwsXrayRemoteSamplerBuilder setPollingInterval(long delay, TimeUnit unit)
      Sets the polling interval for configuration updates. If unset, defaults to 300Ls. Must be positive.
    • setInitialSampler

      public AwsXrayRemoteSamplerBuilder 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 always-on sampler.
    • setClock

      public AwsXrayRemoteSamplerBuilder setClock(io.opentelemetry.sdk.common.Clock clock)
      Sets the Clock used for time measurements for sampling, such as rate limiting or quota expiry.
    • build

      public AwsXrayRemoteSampler build()
      Returns a AwsXrayRemoteSampler with the configuration of this builder.