Class MongoMetricsCommandListener

  • All Implemented Interfaces:
    com.mongodb.event.CommandListener

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void commandFailed​(com.mongodb.event.CommandFailedEvent event)  
      void commandStarted​(com.mongodb.event.CommandStartedEvent commandStartedEvent)  
      void commandSucceeded​(com.mongodb.event.CommandSucceededEvent event)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MongoMetricsCommandListener

        public MongoMetricsCommandListener​(MeterRegistry registry)
    • Method Detail

      • 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