Class OpenTelemetryAgentSpanContext

java.lang.Object
io.prometheus.metrics.tracer.agent.OpenTelemetryAgentSpanContext
All Implemented Interfaces:
io.prometheus.metrics.tracer.common.SpanContext

public class OpenTelemetryAgentSpanContext extends Object implements io.prometheus.metrics.tracer.common.SpanContext
This is exactly the same as the OpenTelemetrySpanContextSupplier. However, the io.opentelemetry.api package is relocated to io.opentelemetry.javaagent.shaded.io.opentelemetry.api in the OpenTelemetry agent.
  • Constructor Details

    • OpenTelemetryAgentSpanContext

      public OpenTelemetryAgentSpanContext()
  • Method Details

    • isAvailable

      public static boolean isAvailable()
    • getCurrentTraceId

      @Nullable public String getCurrentTraceId()
      Specified by:
      getCurrentTraceId in interface io.prometheus.metrics.tracer.common.SpanContext
    • getCurrentSpanId

      @Nullable public String getCurrentSpanId()
      Specified by:
      getCurrentSpanId in interface io.prometheus.metrics.tracer.common.SpanContext
    • isCurrentSpanSampled

      public boolean isCurrentSpanSampled()
      Specified by:
      isCurrentSpanSampled in interface io.prometheus.metrics.tracer.common.SpanContext
    • markCurrentSpanAsExemplar

      public void markCurrentSpanAsExemplar()
      Specified by:
      markCurrentSpanAsExemplar in interface io.prometheus.metrics.tracer.common.SpanContext