Class LazySleuthSpanContextSupplier
- java.lang.Object
-
- org.springframework.cloud.sleuth.instrument.prometheus.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
ASpanContextSupplierthat fetches theTracerlazily after singletons are instantiated and uses it onwards.- Author:
- Jonatan Ivanov
-
-
Constructor Summary
Constructors Constructor Description LazySleuthSpanContextSupplier(org.springframework.beans.factory.ObjectProvider<Tracer> tracerProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSingletonsInstantiated()StringgetSpanId()StringgetTraceId()
-
-
-
Constructor Detail
-
LazySleuthSpanContextSupplier
public LazySleuthSpanContextSupplier(org.springframework.beans.factory.ObjectProvider<Tracer> tracerProvider)
-
-
Method Detail
-
getTraceId
public String getTraceId()
- Specified by:
getTraceIdin interfaceio.prometheus.client.exemplars.tracer.common.SpanContextSupplier
-
getSpanId
public String getSpanId()
- Specified by:
getSpanIdin interfaceio.prometheus.client.exemplars.tracer.common.SpanContextSupplier
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
-