I am trying to add metrics to a plain Java application using codahale metrics. I\'d like to use the @Timed annotation, but it is unclear to me which MetricRegistry it uses,
Use the built-in MetricRegistry accessed from the bootstrap parameter in the initialize method of your application class.
@Override public void initialize(final Bootstrap bootstrap) { final JmxReporter reporter = JmxReporter.forRegistry(bootstrap.getMetricRegistry()).build(); reporter.start(); }