Class ContextProviderFactory

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

@Deprecated(since="5.1", forRemoval=true) public class ContextProviderFactory extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.1 in favor of native MongoDB Java Driver observability support.
Factory to create a ContextProvider to propagate the request context across tasks. Requires either SynchronousContextProvider or ReactiveContextProvider to be present.

NOTE: MongoDB Java Driver 5.7+ comes with observability directly built in which can be configured via MongoClientSettings.Builder#observabilitySettings(ObservabilitySettings). We recommend switching to the driver native observability.

Since:
3.0
Author:
Mark Paluch
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.mongodb.ContextProvider
    create(io.micrometer.observation.ObservationRegistry observationRegistry)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a ContextProvider given ObservationRegistry.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContextProviderFactory

      public ContextProviderFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • create

      public static com.mongodb.ContextProvider create(io.micrometer.observation.ObservationRegistry observationRegistry)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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: