Skip to content
On this page

Micrometer Collections Binder

Binder for Micrometer to monitor the metrics of MongoDB collection.

Metrics

MetricTypeDescriptionUnit
mongodb.collection.${mongoDatabase.name}.${collectionName}.sizeGaugeThe total size of all documents for the collectionByte
mongodb.collection.${mongoDatabase.name}.${collectionName}.countGaugeThe total number of documents in the collectionObjects
mongodb.collection.${mongoDatabase.name}.${collectionName}.totalIndexSizeGaugeThe total size of all indexes for the collectionByte
mongodb.collection.${mongoDatabase.name}.${collectionName}.avgObjSizeGaugeThe avg size of documents for the collectionByte

Usage

scala
CollectionMetrics(MongoTestServer.providerMetrics.database(), "pokedex").bindTo(registry)

Released under the Apache License 2.0.