14.2.4 The Metrics Endpoint

Micronaut can expose application metrics via integration with Micrometer.

Using the CLI

If you create your project using the Micronaut CLI, supply one of the micrometer features to enable metrics and preconfigure the selected registry 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 returns 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.