Class AwsXrayRemoteSampler

java.lang.Object
io.opentelemetry.contrib.awsxray.AwsXrayRemoteSampler
All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler, Closeable, AutoCloseable

public final class AwsXrayRemoteSampler extends Object implements io.opentelemetry.sdk.trace.samplers.Sampler, Closeable
Remote sampler that gets sampling configuration from AWS X-Ray.
  • Method Details

    • newBuilder

      public static AwsXrayRemoteSamplerBuilder newBuilder(io.opentelemetry.sdk.resources.Resource resource)
      Returns a AwsXrayRemoteSamplerBuilder with the given Resource. This Resource should be the same as what the OpenTelemetry SDK is configured with.
    • shouldSample

      public io.opentelemetry.sdk.trace.samplers.SamplingResult shouldSample(io.opentelemetry.context.Context parentContext, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks)
      Specified by:
      shouldSample in interface io.opentelemetry.sdk.trace.samplers.Sampler
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface io.opentelemetry.sdk.trace.samplers.Sampler
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable