Class CustomMetrics

java.lang.Object
org.saidone.monitor.CustomMetrics

@Component public class CustomMetrics extends Object
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 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 with
      mongoTemplate - template used to query MongoDB collections