Interface MetricAttributeGenerator


public interface MetricAttributeGenerator
Metric attribute generator defines an interface for classes that can generate specific attributes to be used by an AwsSpanMetricsProcessor to produce metrics and by AwsMetricAttributesSpanExporter to wrap the original span.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.opentelemetry.api.common.Attributes
    generateMetricAttributesFromSpan(io.opentelemetry.sdk.trace.data.SpanData span, io.opentelemetry.sdk.resources.Resource resource)
    Given a span and associated resource, produce meaningful metric attributes for metrics produced from the span.
  • Method Details

    • generateMetricAttributesFromSpan

      io.opentelemetry.api.common.Attributes generateMetricAttributesFromSpan(io.opentelemetry.sdk.trace.data.SpanData span, io.opentelemetry.sdk.resources.Resource resource)
      Given a span and associated resource, produce meaningful metric attributes for metrics produced from the span. If no metrics should be generated from this span, return Attributes.empty().
      Parameters:
      span - - SpanData to be used to generate metric attributes.
      resource - - Resource associated with Span to be used to generate metric attributes.
      Returns:
      A set of zero or more attributes. Must not return null.