Package org.saidone.monitor
Class CustomMetrics
java.lang.Object
org.saidone.monitor.CustomMetrics
Registers and exposes application specific metrics using Micrometer.
Currently exposes a gauge metric named nodes_on_vault
reporting the
number of documents stored in the alf_node
MongoDB collection.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomMetrics
(io.micrometer.core.instrument.MeterRegistry meterRegistry, org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) Creates a new instance and registers the custom gauge metric. -
Method Summary
-
Constructor Details
-
CustomMetrics
public CustomMetrics(io.micrometer.core.instrument.MeterRegistry meterRegistry, org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) Creates a new instance and registers the custom gauge metric.- Parameters:
meterRegistry
- the registry to register metrics withmongoTemplate
- template used to query MongoDB collections
-