Class MongoMetricsConnectionPoolListener
java.lang.Object
io.micrometer.core.instrument.binder.mongodb.MongoMetricsConnectionPoolListener
- All Implemented Interfaces:
com.mongodb.event.ConnectionPoolListener,EventListener
@NonNullApi
@NonNullFields
@Incubating(since="1.2.0")
public class MongoMetricsConnectionPoolListener
extends Object
implements com.mongodb.event.ConnectionPoolListener
ConnectionPoolListener for collecting connection pool metrics from
MongoClient.- Since:
- 1.2.0
- Implementation Note:
- This implementation requires MongoDB Java driver 4 or later.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newMongoMetricsConnectionPoolListener.MongoMetricsConnectionPoolListener(MeterRegistry registry, MongoConnectionPoolTagsProvider tagsProvider) Create a newMongoMetricsConnectionPoolListener. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionCheckedIn(com.mongodb.event.ConnectionCheckedInEvent event) voidconnectionCheckedOut(com.mongodb.event.ConnectionCheckedOutEvent event) voidconnectionCheckOutFailed(com.mongodb.event.ConnectionCheckOutFailedEvent event) voidconnectionCheckOutStarted(com.mongodb.event.ConnectionCheckOutStartedEvent event) voidconnectionClosed(com.mongodb.event.ConnectionClosedEvent event) voidconnectionCreated(com.mongodb.event.ConnectionCreatedEvent event) voidconnectionPoolClosed(com.mongodb.event.ConnectionPoolClosedEvent event) voidconnectionPoolCreated(com.mongodb.event.ConnectionPoolCreatedEvent event) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mongodb.event.ConnectionPoolListener
connectionAdded, connectionPoolCleared, connectionPoolOpened, connectionPoolReady, connectionReady, connectionRemoved
-
Constructor Details
-
MongoMetricsConnectionPoolListener
Create a newMongoMetricsConnectionPoolListener.- Parameters:
registry- registry to use
-
MongoMetricsConnectionPoolListener
public MongoMetricsConnectionPoolListener(MeterRegistry registry, MongoConnectionPoolTagsProvider tagsProvider) Create a newMongoMetricsConnectionPoolListener.- Parameters:
registry- registry to usetagsProvider- tags provider to use- Since:
- 1.7.0
-
-
Method Details
-
connectionPoolCreated
public void connectionPoolCreated(com.mongodb.event.ConnectionPoolCreatedEvent event) - Specified by:
connectionPoolCreatedin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionPoolClosed
public void connectionPoolClosed(com.mongodb.event.ConnectionPoolClosedEvent event) - Specified by:
connectionPoolClosedin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionCheckOutStarted
public void connectionCheckOutStarted(com.mongodb.event.ConnectionCheckOutStartedEvent event) - Specified by:
connectionCheckOutStartedin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionCheckedOut
public void connectionCheckedOut(com.mongodb.event.ConnectionCheckedOutEvent event) - Specified by:
connectionCheckedOutin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionCheckOutFailed
public void connectionCheckOutFailed(com.mongodb.event.ConnectionCheckOutFailedEvent event) - Specified by:
connectionCheckOutFailedin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionCheckedIn
public void connectionCheckedIn(com.mongodb.event.ConnectionCheckedInEvent event) - Specified by:
connectionCheckedInin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionCreated
public void connectionCreated(com.mongodb.event.ConnectionCreatedEvent event) - Specified by:
connectionCreatedin interfacecom.mongodb.event.ConnectionPoolListener
-
connectionClosed
public void connectionClosed(com.mongodb.event.ConnectionClosedEvent event) - Specified by:
connectionClosedin interfacecom.mongodb.event.ConnectionPoolListener
-