Class LazySleuthSpanContextSupplier

  • All Implemented Interfaces:
    io.prometheus.client.exemplars.tracer.common.SpanContextSupplier, org.springframework.beans.factory.SmartInitializingSingleton

    public class LazySleuthSpanContextSupplier
    extends Object
    implements io.prometheus.client.exemplars.tracer.common.SpanContextSupplier, org.springframework.beans.factory.SmartInitializingSingleton
    A SpanContextSupplier that fetches the Tracer lazily after singletons are instantiated and uses it onwards.
    Author:
    Jonatan Ivanov
    • Constructor Detail

      • LazySleuthSpanContextSupplier

        public LazySleuthSpanContextSupplier​(org.springframework.beans.factory.ObjectProvider<Tracer> tracerProvider)
    • 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
      • afterSingletonsInstantiated

        public void afterSingletonsInstantiated()
        Specified by:
        afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton