Class OtlpExemplarContext

java.lang.Object
io.micrometer.registry.otlp.OtlpExemplarContext

public class OtlpExemplarContext extends Object
Context that contains the necessary information to create an exemplar.
Since:
1.17.0
  • Constructor Details

    • OtlpExemplarContext

      public OtlpExemplarContext(String traceId, String spanId)
      Parameters:
      traceId - the TraceId of the Span, it must be represented as a case-insensitive hex-encoded string
      spanId - the SpanId of the Span, it must be represented as a case-insensitive hex-encoded string
      See Also:
    • OtlpExemplarContext

      public OtlpExemplarContext(@Nullable String traceId, @Nullable String spanId, Iterable<io.micrometer.common.KeyValue> keyValues)
      Parameters:
      traceId - the TraceId of the Span, it must be represented as a case-insensitive hex-encoded string
      spanId - the SpanId of the Span, it must be represented as a case-insensitive hex-encoded string
      keyValues - arbitrary key-value pairs to attach to the exemplar
      See Also:
  • Method Details

    • getTraceId

      public @Nullable String getTraceId()
      Returns:
      TraceId of the Span, represented by a case-insensitive hex-encoded string
      See Also:
    • getSpanId

      public @Nullable String getSpanId()
      Returns:
      SpanId of the Span, represented by a case-insensitive hex-encoded string
      See Also:
    • getKeyValues

      public Iterable<io.micrometer.common.KeyValue> getKeyValues()
      Returns:
      key-value pairs to be attached to the exemplar
      See Also:
      • KeyValues