Spring Boot Actuator provides dependency management and auto-configuration for Micrometer, an application metrics facade that supports numerous monitoring systems, including:
![]() | Note |
|---|---|
At the time of this writing, the number of monitoring systems supported by Micrometer is growing rapidly. See the Micrometer project for more information. |
Micrometer provides a separate module for each supported monitoring system. Depending on one (or more) of these modules is sufficient to get started with Micrometer in your Spring Boot application. To learn more about Micrometer’s capabilities, please refer to its reference documentation.
Auto-configuration enables the instrumentation of requests handled by Spring MVC. When
management.metrics.web.server.auto-time-requests is true, this instrumentation occurs
for all requests. Alternatively, when set to false, you can enable instrumentation by
adding @Timed to a request-handling method.
By default, metrics are generated with the name, http.server.requests. The name can be
customized by setting the management.metrics.web.server.requests-metric-name property.
By default, Spring MVC-related metrics are tagged with the following information:
To customize the tags, provide a @Bean that implements WebMvcTagsProvider.
Auto-configuration enables the instrumentation of all requests handled by WebFlux
controllers. You can also use a helper class, RouterFunctionMetrics, to instrument
applications that use WebFlux’s functional programming model.
By default, metrics are generated with the name http.server.requests. You can customize
the name by setting the management.metrics.web.server.requests-metric-name property.
By default, WebFlux-related metrics for the annotation-based programming model are tagged with the following information:
To customize the tags, provide a @Bean that implements WebFluxTagsProvider.
By default, metrics for the functional programming model are tagged with the following information:
To customize the tags, use the defaultTags method on your RouterFunctionMetrics
instance.
The instrumentation of any RestTemplate created using the auto-configured
RestTemplateBuilder is enabled. It is also possible to apply
MetricsRestTemplateCustomizer manually.
By default, metrics are generated with the name, http.client.requests. The name can be
customized by setting the management.metrics.web.client.requests-metric-name property.
Auto-configuration will enable the instrumentation of all available Caches on startup
with a metric named cache. The prefix can be customized by using the
management.metrics.cache.metric-name property. Cache instrumentation is specific
to each cache library, refer to the micrometer documentation
for more details.
The following cache libraries are supported:
Metrics will also be tagged by the name of the CacheManager computed based on the bean
name.
![]() | Note |
|---|---|
Only caches that are available on startup are bound to the registry. For caches
created on-the-fly or programmatically after the startup phase, an explicit registration
is required. A |
Auto-configuration enables the instrumentation of all available DataSource objects
with a metric named data.source. Data source instrumentation results in gauges
representing the currently active, maximum allowed, and minimum allowed connections in the
pool. Each of these gauges has a name that is prefixed by data.source by default. The
prefix can be customized by setting the management.metrics.jdbc.metric-name
property.
Metrics are also tagged by the name of the DataSource computed based on the bean name.
Auto-configuration will enable the instrumentation of all available RabbitMQ connection
factories with a metric named rabbitmq. The prefix can be customized by using the
management.metrics.rabbitmq.metric-name property.
Auto-configuration enables binding of a number of Spring Integration-related metrics:
Table 53.1. General metrics
| Metric | Description |
|---|---|
| Number of Spring Integration channels |
| Number of Spring Integration handlers |
| Number of Spring Integration sources |
Table 53.2. Channel metrics
| Metric | Description |
|---|---|
| Number of receives |
| Number of failed sends |
| Number of successful sends |
Table 53.3. Handler metrics
| Metric | Description |
|---|---|
| Maximum handler duration in milliseconds |
| Minimum handler duration in milliseconds |
| Mean handler duration in milliseconds |
| Number of active handlers |
Table 53.4. Source metrics
| Metric | Description |
|---|---|
| Number of successful source calls |