This example demonstrates basics of Micrometer Jersey integration
The mapping of the URI path space is presented in the following table:
URI path | Resource class | HTTP methods |
---|---|---|
/micro/timed | MeasuredTimedResource | GET |
/micro/metrics | MetricsResource | GET |
/micro/summary | SummaryResource | GET |
--- (micro/timed)
Requests to this method are measured. Use /init to see more
---- (micro/metrics)
Static meters are initialized, try summary. If you want more measurements just refresh this page several times.
---- (micro/summary)
Listing available meters
Many occurrences of the same name means that there are more meters which could be used with different tags, but this is actually a challenge to handle all available metrics :
http.timers;
http.shared.metrics;
Counts to the init page: 2, time spent on requests to the init page (millis): 2.759025
Requests to 'measure/timed' counts: 2, total time (millis): 40.110161
Run the example using Grizzly container as follows:
mvn clean compile exec:java