Class MongoHandlerContext

java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.data.mongodb.observability.MongoHandlerContext

public class MongoHandlerContext extends io.micrometer.observation.Observation.Context
A Observation.Context that contains MongoDB events.
Since:
4.0.0
Author:
Marcin Grzejszczak, Greg Turnquist
  • Constructor Details

    • MongoHandlerContext

      public MongoHandlerContext(com.mongodb.event.CommandStartedEvent commandStartedEvent, com.mongodb.RequestContext requestContext)
  • Method Details

    • getCommandStartedEvent

      public com.mongodb.event.CommandStartedEvent getCommandStartedEvent()
    • getRequestContext

      public com.mongodb.RequestContext getRequestContext()
    • getCollectionName

      public String getCollectionName()
    • getContextualName

      public String getContextualName()
      Overrides:
      getContextualName in class io.micrometer.observation.Observation.Context
    • setCommandSucceededEvent

      public void setCommandSucceededEvent(com.mongodb.event.CommandSucceededEvent commandSucceededEvent)
    • setCommandFailedEvent

      public void setCommandFailedEvent(com.mongodb.event.CommandFailedEvent commandFailedEvent)