Class MongoHandlerContext
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<Object>
org.springframework.data.mongodb.observability.MongoHandlerContext
- All Implemented Interfaces:
Observation.ContextView
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 Summary
ConstructorsConstructorDescriptionMongoHandlerContext(@Nullable ConnectionString connectionString, CommandStartedEvent commandStartedEvent, RequestContext requestContext) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class SenderContext
getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceNameMethods inherited from class Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Observation.ContextView
getOrDefault
-
Constructor Details
-
MongoHandlerContext
public MongoHandlerContext(@Nullable ConnectionString connectionString, CommandStartedEvent commandStartedEvent, RequestContext requestContext)
-
-
Method Details
-
getCommandStartedEvent
-
getRequestContext
-
getDatabaseName
-
getCollectionName
-
getCommandName
-
getConnectionString
-