dropwizard-mongo icon indicating copy to clipboard operation
dropwizard-mongo copied to clipboard

Add metrics to the client

Open ctrimble opened this issue 9 years ago • 0 comments

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.

ctrimble avatar Jan 15 '16 17:01 ctrimble