dropwizard-mongo
dropwizard-mongo copied to clipboard
Add metrics to the client
The MongoClientOptions.Builder class supports several listeners that can be added to a client. Register metrics on the client using the MongoClientBuilder. Something like:
client = new MongoClientBuilder()
...
.withMetrics(Registry registry)
.build();
The metrics must be optional, so the builder can still be used in commands.