Class ContextProviderFactory

java.lang.Object
org.springframework.data.mongodb.observability.ContextProviderFactory

public class ContextProviderFactory extends Object
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 Details

    • ContextProviderFactory

      public ContextProviderFactory()
  • Method Details

    • create

      public static com.mongodb.ContextProvider create(io.micrometer.observation.ObservationRegistry observationRegistry)
      Create a ContextProvider given ObservationRegistry. The factory method attempts to create a ContextProvider 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: