Package io.opentelemetry.contrib.awsxray
Class AwsXrayRemoteSamplerBuilder
- java.lang.Object
-
- io.opentelemetry.contrib.awsxray.AwsXrayRemoteSamplerBuilder
-
public final class AwsXrayRemoteSamplerBuilder extends Object
A builder forAwsXrayRemoteSampler.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsXrayRemoteSamplerbuild()Returns aAwsXrayRemoteSamplerwith the configuration of this builder.AwsXrayRemoteSamplerBuildersetClock(io.opentelemetry.sdk.common.Clock clock)Sets theClockused for time measurements for sampling, such as rate limiting or quota expiry.AwsXrayRemoteSamplerBuildersetEndpoint(String endpoint)Sets the endpoint for the TCP proxy to connect to.AwsXrayRemoteSamplerBuildersetInitialSampler(io.opentelemetry.sdk.trace.samplers.Sampler initialSampler)Sets the initial sampler that is used before sampling configuration is obtained.AwsXrayRemoteSamplerBuildersetPollingInterval(long delay, TimeUnit unit)Sets the polling interval for configuration updates.AwsXrayRemoteSamplerBuildersetPollingInterval(Duration delay)Sets the polling interval for configuration updates.
-
-
-
Method Detail
-
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 theClockused for time measurements for sampling, such as rate limiting or quota expiry.
-
build
public AwsXrayRemoteSampler build()
Returns aAwsXrayRemoteSamplerwith the configuration of this builder.
-
-