14.2.4 The Metrics Endpoint

Micronaut includes the ability to expose Metrics via integration with Micrometer.

Using the CLI

If you are creating your project using the Micronaut CLI, supply one of the micrometer features to enable metrics and preconfigure the selected registery in your project. For example:

  1. $ mn create-app my-app features micrometer-atlas

The metrics endpoint returns information about the “metrics” of the application. To execute the metrics endpoint, send a GET request to /metrics. This will return a list of available metric names.

You can get specific metrics by using /metrics/[name] such as /metrics/jvm.memory.used.

See the documentation for Micronaut Micrometer for a list of registries and information on how to configure, expose and customize metrics output.