Class ContextProviderFactory
java.lang.Object
org.springframework.data.mongodb.observability.ContextProviderFactory
Factory to create a
ContextProvider
to propagate the request context across tasks. Requires either
SynchronousContextProvider
or ReactiveContextProvider
to be present.- Since:
- 3.0
- Author:
- Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mongodb.ContextProvider
create
(io.micrometer.observation.ObservationRegistry observationRegistry) Create aContextProvider
givenObservationRegistry
.
-
Constructor Details
-
ContextProviderFactory
public ContextProviderFactory()
-
-
Method Details
-
create
public static com.mongodb.ContextProvider create(io.micrometer.observation.ObservationRegistry observationRegistry) Create aContextProvider
givenObservationRegistry
. The factory method attempts to create aContextProvider
that is capable to propagate request contexts across imperative or reactive usage, depending on their class path presence.- Parameters:
observationRegistry
- must not be null.- Returns:
-