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 Details

    • ContextProviderFactory

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

    • create

      public static ContextProvider create(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: