Class MongoMetricsCommandListener

java.lang.Object
io.micrometer.core.instrument.binder.mongodb.MongoMetricsCommandListener
All Implemented Interfaces:
com.mongodb.event.CommandListener

@NonNullApi @NonNullFields @Incubating(since="1.2.0") public class MongoMetricsCommandListener extends Object implements com.mongodb.event.CommandListener
CommandListener for collecting command metrics from MongoClient.
Since:
1.2.0
  • Constructor Details

    • MongoMetricsCommandListener

      public MongoMetricsCommandListener(MeterRegistry registry)
  • Method Details

    • commandStarted

      public void commandStarted(com.mongodb.event.CommandStartedEvent commandStartedEvent)
      Specified by:
      commandStarted in interface com.mongodb.event.CommandListener
    • commandSucceeded

      public void commandSucceeded(com.mongodb.event.CommandSucceededEvent event)
      Specified by:
      commandSucceeded in interface com.mongodb.event.CommandListener
    • commandFailed

      public void commandFailed(com.mongodb.event.CommandFailedEvent event)
      Specified by:
      commandFailed in interface com.mongodb.event.CommandListener