Spring Boot Actuator provides dependency management and auto-configuration for Micrometer, an application metrics facade that supports numerous monitoring systems:
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
spring.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 spring.metrics.web.server.requests-metrics-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 spring.metrics.web.server.requests-metrics-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.
Auto-configuration customizes the auto-configured RestTemplate
to enable the
instrumentation of its requests. MetricsRestTemplateCustomizer
can be used to customize
your own RestTemplate
instances.
By default, metrics are generated with the name, http.client.requests
. The name can be
customized by setting the spring.metrics.web.client.requests-metrics-name
property.
Auto-configuration will enable the instrumentation of all available DataSource
s 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 which is prefixed by data.source
by default. The prefix can
be customized by using the spring.metrics.jdbc.datasource-metric-name
property.
Metrics will also be tagged by the name of the DataSource
computed based on the bean
name.
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 |