To use the web service in Jersey, you need to add a module to the metrics-jersey application that contains the @Provider implementation class (make sure Jersey finds it) that will allow you to use Jersey resource tools annotated with @Timed, Metered and ExceptionMetered.
Metrics reports through JMX by default, so you can use JConsole to test your tools. As Alex wrote, there are other reporting options, but this requires additional configuration or code (calling the enable
method in the reporter). For example, you can receive reports in JSON over HTTP or send web services to a monitoring server such as Graphite.
source share