Class AwsMetricAttributesSpanExporter

java.lang.Object
io.opentelemetry.contrib.awsxray.AwsMetricAttributesSpanExporter
All Implemented Interfaces:
io.opentelemetry.sdk.trace.export.SpanExporter, Closeable, AutoCloseable

@Immutable public class AwsMetricAttributesSpanExporter extends Object implements io.opentelemetry.sdk.trace.export.SpanExporter
This exporter will update a span with metric attributes before exporting. It depends on a SpanExporter being provided on instantiation, which the AwsSpanMetricsExporter will delegate export to. Also, a MetricAttributeGenerator must be provided, which will provide a means to determine attributes which should be applied to the span. Finally, a Resource must be provided, which is used to generate metric attributes.

This exporter should be coupled with the AwsSpanMetricsProcessor using the same MetricAttributeGenerator. This will result in metrics and spans being produced with common attributes.

  • Method Details

    • export

      public io.opentelemetry.sdk.common.CompletableResultCode export(Collection<io.opentelemetry.sdk.trace.data.SpanData> spans)
      Specified by:
      export in interface io.opentelemetry.sdk.trace.export.SpanExporter
    • flush

      public io.opentelemetry.sdk.common.CompletableResultCode flush()
      Specified by:
      flush in interface io.opentelemetry.sdk.trace.export.SpanExporter
    • shutdown

      public io.opentelemetry.sdk.common.CompletableResultCode shutdown()
      Specified by:
      shutdown in interface io.opentelemetry.sdk.trace.export.SpanExporter
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface io.opentelemetry.sdk.trace.export.SpanExporter