We already collect a handful of metrics using the DropWizard metrics library. That set of metrics will expand over time to include metrics for things like:
- Total number of requests per end point
- Memory and garbage collection stats
- DastaxStax driver metrics
We do not yet persist any of these internal metrics. There is already a framework within DropWizard for doing this. It is just a matter of configuring a com.codahale.metrics.Reporter instance. We probably want to use a com.codahale.metrics.ScheduledReporter to periodically persist the metrics being collected. Even though we currently do not support all DropWizard metric types like histograms, implementing a ScheduledReporter should be pretty straightforward.
Here are some questions to consider:
- Should viewing these metrics be restricted, e.g., admins only?
- What collection interval should be used?
- Should the collection interval be configurable?
- Should the data retention for these metrics be configurable?
- Should we allow enabling/disabling collecting and persisting of these metrics?