diff --git a/docs/monitoring.adoc b/docs/monitoring.adoc index 24cee72..37fa64a 100644 --- a/docs/monitoring.adoc +++ b/docs/monitoring.adoc @@ -130,7 +130,7 @@ And then access the metrics again, this time we'll look for our new metric: [source,sh,role="copypaste"] ---- -curl http://localhost:8080/metrics | grep -i greeting +curl http://localhost:8080/metrics/application ---- You'll see: @@ -149,6 +149,11 @@ This shows we've accessed the greetings once (`1.0`). Repeat the `curl` greeting The comments in the metrics output starting with `#` are part of the format and give human-readable descriptions to the metrics which you'll see later on. ==== +[NOTE] +==== +MicroProfile Metrics names are prefixed with things like `vendor:` or `application:` or `base:`. These can be selectively accessed by adding the name to the accessed endpoint, e.g. `curl http://localhost:8080/metrics/application` or `curl http://localhost:8080/metrics/base`. +==== + ## Add a few more Let's add a few more metrics for our Kafka stream we setup in the previous exercise. Open the `NameConverter` class (in the `org.acme.people.stream` package), and add these metrics annotations to the `process()` method: