Class MongodbObservationContext

java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<Object>
com.mongodb.observability.micrometer.MongodbObservationContext
All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView

public class MongodbObservationContext extends io.micrometer.observation.transport.SenderContext<Object>
A MongoDB-specific SenderContext for Micrometer observations.

Extends SenderContext with Kind.CLIENT to preserve the client span kind in the tracing bridge. Provides a MongoDB-specific type that users can filter on when registering ObservationHandler or ObservationConvention instances.

Domain fields (commandName, databaseName, etc.) are populated by the driver after the observation is started and before it is stopped. The ObservationConvention reads these fields at stop time to produce the final tag key-values.

Since:
5.7