This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Data MongoDB 4.3.5!

Metrics

Below you can find a list of all metrics declared by this project.

Mongodb Command Observation

Timer created around a MongoDB command execution.

Metric name spring.data.mongodb.command. Type timer.

Metric name spring.data.mongodb.command.active. Type long task timer.

KeyValues that are added after starting the Observation might be missing from the *.active metrics.
Micrometer internally uses nanoseconds for the baseunit. However, each backend determines the actual baseunit. (i.e. Prometheus uses seconds)

Fully qualified name of the enclosing class org.springframework.data.mongodb.observability.MongoObservation.

Table 1. Low cardinality Keys

Name

Description

db.connection_string (required)

MongoDB connection string.

db.mongodb.collection (required)

MongoDB collection name.

db.name (required)

MongoDB database name.

db.operation (required)

MongoDB command value.

db.system (required)

MongoDB database system.

db.user (required)

MongoDB user.

net.peer.name (required)

Name of the database host.

net.peer.port (required)

Logical remote port number.

net.sock.peer.addr (required)

Mongo peer address.

net.sock.peer.port (required)

Mongo peer port.

net.transport (required)

Network transport.

spring.data.mongodb.cluster_id (required)

MongoDB cluster identifier.