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
A
SpanContextSupplier that fetches the Tracer lazily after singletons
are instantiated and uses it onwards.- Author:
- Jonatan Ivanov
-
Constructor Summary
ConstructorsConstructorDescriptionLazySleuthSpanContextSupplier(org.springframework.beans.factory.ObjectProvider<Tracer> tracerProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
-
Constructor Details
-
LazySleuthSpanContextSupplier
public LazySleuthSpanContextSupplier(org.springframework.beans.factory.ObjectProvider<Tracer> tracerProvider)
-
-
Method Details
-
getTraceId
- Specified by:
getTraceIdin interfaceio.prometheus.client.exemplars.tracer.common.SpanContextSupplier
-
getSpanId
- Specified by:
getSpanIdin interfaceio.prometheus.client.exemplars.tracer.common.SpanContextSupplier
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-