@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
.Constructor and Description |
---|
MongoMetricsCommandListener(MeterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
void |
commandFailed(com.mongodb.event.CommandFailedEvent event) |
void |
commandStarted(com.mongodb.event.CommandStartedEvent commandStartedEvent) |
void |
commandSucceeded(com.mongodb.event.CommandSucceededEvent event) |
public MongoMetricsCommandListener(MeterRegistry registry)
public void commandStarted(com.mongodb.event.CommandStartedEvent commandStartedEvent)
commandStarted
in interface com.mongodb.event.CommandListener
public void commandSucceeded(com.mongodb.event.CommandSucceededEvent event)
commandSucceeded
in interface com.mongodb.event.CommandListener
public void commandFailed(com.mongodb.event.CommandFailedEvent event)
commandFailed
in interface com.mongodb.event.CommandListener