Class MongoHandlerContext

All Implemented Interfaces:
Observation.ContextView

@Deprecated(since="5.1", forRemoval=true) public class MongoHandlerContext extends SenderContext<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.
A Observation.Context that contains MongoDB events.

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:
4.0
Author:
Marcin Grzejszczak, Greg Turnquist, Mark Paluch
  • Constructor Details

  • Method Details

    • getCommandStartedEvent

      public @Nullable CommandStartedEvent getCommandStartedEvent()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getRequestContext

      public @Nullable RequestContext getRequestContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDatabaseName

      public String getDatabaseName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCollectionName

      public @Nullable String getCollectionName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCommandName

      public String getCommandName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getConnectionString

      public @Nullable ConnectionString getConnectionString()
      Deprecated, for removal: This API element is subject to removal in a future version.