Class SleuthSpanContextSupplier

  • All Implemented Interfaces:
    io.prometheus.client.exemplars.tracer.common.SpanContextSupplier

    public class SleuthSpanContextSupplier
    extends Object
    implements io.prometheus.client.exemplars.tracer.common.SpanContextSupplier
    SpanContextSupplier that integrates Sleuth's Tracer with Prometheus exemplars.
    Since:
    3.1.0
    Author:
    Jonatan Ivanov
    • Constructor Detail

      • SleuthSpanContextSupplier

        public SleuthSpanContextSupplier​(Tracer tracer)
        Parameters:
        tracer - The tracer implementation to query for the current TraceId and SpanId.
    • Method Detail

      • getTraceId

        public String getTraceId()
        Specified by:
        getTraceId in interface io.prometheus.client.exemplars.tracer.common.SpanContextSupplier
      • getSpanId

        public String getSpanId()
        Specified by:
        getSpanId in interface io.prometheus.client.exemplars.tracer.common.SpanContextSupplier