A simple practical example of the prometheus java client.
Clone this repository and open it using your favorite IDE (like IntelliJ). Run the server and send requests using curl: curl "http://localhost:8080?foo=foo&bar=bar"
. Access http://localhost:1234/
to see the exported metrics.