Polish actuator docs markup and formatting
Improve consistency of the asciidoctor markup and formatting for the actuator section. See gh-27759
This commit is contained in:
parent
393081f2e6
commit
e44585d89a
|
@ -5,7 +5,7 @@ This feature can be very useful for reporting and for implementing a lock-out po
|
|||
|
||||
Auditing can be enabled by providing a bean of type `AuditEventRepository` in your application's configuration.
|
||||
For convenience, Spring Boot offers an `InMemoryAuditEventRepository`.
|
||||
`InMemoryAuditEventRepository` has limited capabilities and we recommend using it only for development environments.
|
||||
`InMemoryAuditEventRepository` has limited capabilities, and we recommend using it only for development environments.
|
||||
For production environments, consider creating your own alternative `AuditEventRepository` implementation.
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ In order to use the endpoint, a valid UAA token must be passed with the request.
|
|||
=== Disabling Extended Cloud Foundry Actuator Support
|
||||
If you want to fully disable the `/cloudfoundryapplication` endpoints, you can add the following setting to your `application.properties` file:
|
||||
|
||||
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
----
|
||||
management:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[[actuator.enabling]]
|
||||
== Enabling Production-ready Features
|
||||
The {spring-boot-code}/spring-boot-project/spring-boot-actuator[`spring-boot-actuator`] module provides all of Spring Boot's production-ready features.
|
||||
The recommended way to enable the features is to add a dependency on the `spring-boot-starter-actuator` '`Starter`'.
|
||||
The recommended way to enable the features is to add a dependency on the `spring-boot-starter-actuator` "`Starter`".
|
||||
|
||||
.Definition of Actuator
|
||||
****
|
||||
|
@ -9,7 +9,7 @@ An actuator is a manufacturing term that refers to a mechanical device for movin
|
|||
Actuators can generate a large amount of motion from a small change.
|
||||
****
|
||||
|
||||
To add the actuator to a Maven based project, add the following '`Starter`' dependency:
|
||||
To add the actuator to a Maven-based project, add the following '`Starter`' dependency:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
|
|
|
@ -63,7 +63,7 @@ The following technology-agnostic endpoints are available:
|
|||
Requires one or more `Liquibase` beans.
|
||||
|
||||
| `metrics`
|
||||
| Shows '`metrics`' information for the current application.
|
||||
| Shows "`metrics`" information for the current application.
|
||||
|
||||
| `mappings`
|
||||
| Displays a collated list of all `@RequestMapping` paths.
|
||||
|
@ -429,7 +429,7 @@ The following configuration permits `GET` and `POST` calls from the `example.com
|
|||
allowed-methods: "GET,POST"
|
||||
----
|
||||
|
||||
TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[CorsEndpointProperties] for a complete list of options.
|
||||
TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[`CorsEndpointProperties`] for a complete list of options.
|
||||
|
||||
|
||||
|
||||
|
@ -547,19 +547,19 @@ The HTTP method of the predicate is determined by the operation type, as shown i
|
|||
[[actuator.endpoints.implementing-custom.web.consumes-predicates]]
|
||||
===== Consumes
|
||||
For a `@WriteOperation` (HTTP `POST`) that uses the request body, the consumes clause of the predicate is `application/vnd.spring-boot.actuator.v2+json, application/json`.
|
||||
For all other operations the consumes clause is empty.
|
||||
For all other operations, the `consumes` clause is empty.
|
||||
|
||||
|
||||
|
||||
[[actuator.endpoints.implementing-custom.web.produces-predicates]]
|
||||
===== Produces
|
||||
The produces clause of the predicate can be determined by the `produces` attribute of the `@DeleteOperation`, `@ReadOperation`, and `@WriteOperation` annotations.
|
||||
The `produces` clause of the predicate can be determined by the `produces` attribute of the `@DeleteOperation`, `@ReadOperation`, and `@WriteOperation` annotations.
|
||||
The attribute is optional.
|
||||
If it is not used, the produces clause is determined automatically.
|
||||
If it is not used, the `produces` clause is determined automatically.
|
||||
|
||||
If the operation method returns `void` or `Void` the produces clause is empty.
|
||||
If the operation method returns a `org.springframework.core.io.Resource`, the produces clause is `application/octet-stream`.
|
||||
For all other operations the produces clause is `application/vnd.spring-boot.actuator.v2+json, application/json`.
|
||||
If the operation method returns `void` or `Void`, the `produces` clause is empty.
|
||||
If the operation method returns a `org.springframework.core.io.Resource`, the `produces` clause is `application/octet-stream`.
|
||||
For all other operations, the `produces` clause is `application/vnd.spring-boot.actuator.v2+json, application/json`.
|
||||
|
||||
|
||||
|
||||
|
@ -741,11 +741,11 @@ Additional `HealthIndicators` are available but not enabled by default:
|
|||
|
||||
| `livenessstate`
|
||||
| {spring-boot-actuator-module-code}/availability/LivenessStateHealthIndicator.java[`LivenessStateHealthIndicator`]
|
||||
| Exposes the "Liveness" application availability state.
|
||||
| Exposes the "`Liveness`" application availability state.
|
||||
|
||||
| `readinessstate`
|
||||
| {spring-boot-actuator-module-code}/availability/ReadinessStateHealthIndicator.java[`ReadinessStateHealthIndicator`]
|
||||
| Exposes the "Readiness" application availability state.
|
||||
| Exposes the "`Readiness`" application availability state.
|
||||
|===
|
||||
|
||||
|
||||
|
@ -886,7 +886,7 @@ Also, any `HealthIndicator` that is not handled explicitly is wrapped automatica
|
|||
==== Health Groups
|
||||
It's sometimes useful to organize health indicators into groups that can be used for different purposes.
|
||||
|
||||
To create a health indicator group you can use the `management.endpoint.health.group.<name>` property and specify a list of health indicator IDs to `include` or `exclude`.
|
||||
To create a health indicator group, you can use the `management.endpoint.health.group.<name>` property and specify a list of health indicator IDs to `include` or `exclude`.
|
||||
For example, to create a group that includes only database indicators you can define the following:
|
||||
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
|
@ -1028,7 +1028,8 @@ This would make `liveness` available at `/livez` and `readiness` at `readyz` on
|
|||
|
||||
[[actuator.endpoints.kubernetes-probes.external-state]]
|
||||
==== Checking External State with Kubernetes Probes
|
||||
Actuator configures the "liveness" and "readiness" probes as Health Groups; this means that all the <<actuator#actuator.endpoints.health.groups, Health Groups features>> are available for them.
|
||||
Actuator configures the "`liveness`" and "`readiness`" probes as Health Groups.
|
||||
This means that all the <<actuator#actuator.endpoints.health.groups, health groups features>> are available for them.
|
||||
You can, for example, configure additional Health Indicators:
|
||||
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
|
|
|
@ -294,13 +294,16 @@ The https://graphiteapp.org[Graphite server] host and port to use can be provide
|
|||
|
||||
Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-docs}/graphite#_hierarchical_name_mapping[mapped to flat hierarchical names].
|
||||
|
||||
TIP: To take control over this behavior, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
|
||||
[TIP]
|
||||
====
|
||||
To take control over this behavior, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
|
||||
An auto-configured `GraphiteConfig` and `Clock` beans are provided unless you define your own:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/actuator/metrics/export/graphite/MyGraphiteConfiguration.java[]
|
||||
----
|
||||
====
|
||||
|
||||
|
||||
|
||||
|
@ -367,13 +370,16 @@ The domain to use can be provided using:
|
|||
|
||||
Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-docs}/jmx#_hierarchical_name_mapping[mapped to flat hierarchical names].
|
||||
|
||||
TIP: To take control over this behavior, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`.
|
||||
[TIP]
|
||||
====
|
||||
To take control over this behavior, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`.
|
||||
An auto-configured `JmxConfig` and `Clock` beans are provided unless you define your own:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/actuator/metrics/export/jmx/MyJmxConfiguration.java[]
|
||||
----
|
||||
====
|
||||
|
||||
|
||||
|
||||
|
@ -854,7 +860,8 @@ Data source instrumentation results in gauges representing the currently active,
|
|||
|
||||
Metrics are also tagged by the name of the `DataSource` computed based on the bean name.
|
||||
|
||||
TIP: By default, Spring Boot provides metadata for all supported data sources; you can add additional `DataSourcePoolMetadataProvider` beans if your favorite data source isn't supported out of the box.
|
||||
TIP: By default, Spring Boot provides metadata for all supported data sources.
|
||||
You can add additional `DataSourcePoolMetadataProvider` beans if your favorite data source is not supported.
|
||||
See `DataSourcePoolMetadataProvidersConfiguration` for examples.
|
||||
|
||||
Also, Hikari-specific metrics are exposed with a `hikaricp` prefix.
|
||||
|
@ -935,6 +942,7 @@ For more details refer to {spring-kafka-docs}#micrometer-native[Micrometer Nativ
|
|||
|
||||
[[actuator.metrics.supported.mongodb]]
|
||||
==== MongoDB Metrics
|
||||
This section briefly describes the available metrics for MongoDB.
|
||||
|
||||
|
||||
|
||||
|
@ -1168,10 +1176,11 @@ For more details on concepts behind `percentiles-histogram`, `percentiles` and `
|
|||
[[actuator.metrics.endpoint]]
|
||||
=== Metrics Endpoint
|
||||
Spring Boot provides a `metrics` endpoint that can be used diagnostically to examine the metrics collected by an application.
|
||||
The endpoint is not available by default and must be exposed, see <<actuator#actuator.endpoints.exposing,exposing endpoints>> for more details.
|
||||
The endpoint is not available by default and must be exposed.
|
||||
See <<actuator#actuator.endpoints.exposing,exposing endpoints>> for more details.
|
||||
|
||||
Navigating to `/actuator/metrics` displays a list of available meter names.
|
||||
You can drill down to view information about a particular meter by providing its name as a selector, e.g. `/actuator/metrics/jvm.memory.max`.
|
||||
You can drill down to view information about a particular meter by providing its name as a selector -- for example, `/actuator/metrics/jvm.memory.max`.
|
||||
|
||||
[TIP]
|
||||
====
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
== What to Read Next
|
||||
You might want to read about graphing tools such as https://graphiteapp.org[Graphite].
|
||||
|
||||
Otherwise, you can continue on, to read about <<deployment#deployment, '`deployment options`'>> or jump ahead for some in-depth information about Spring Boot's _<<build-tool-plugins#build-tool-plugins, build tool plugins>>_.
|
||||
Otherwise, you can continue on to read about <<deployment#deployment, "`deployment options`">> or jump ahead for some in-depth information about Spring Boot's <<build-tool-plugins#build-tool-plugins, build tool plugins>>.
|
||||
|
|
Loading…
Reference in New Issue