Skip to content

Commit e44585d

Browse files
Jay Bryantphilwebb
authored andcommitted
Polish actuator docs markup and formatting
Improve consistency of the asciidoctor markup and formatting for the actuator section. See gh-27759
1 parent 393081f commit e44585d

File tree

6 files changed

+31
-22
lines changed

6 files changed

+31
-22
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/auditing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This feature can be very useful for reporting and for implementing a lock-out po
55

66
Auditing can be enabled by providing a bean of type `AuditEventRepository` in your application's configuration.
77
For convenience, Spring Boot offers an `InMemoryAuditEventRepository`.
8-
`InMemoryAuditEventRepository` has limited capabilities and we recommend using it only for development environments.
8+
`InMemoryAuditEventRepository` has limited capabilities, and we recommend using it only for development environments.
99
For production environments, consider creating your own alternative `AuditEventRepository` implementation.
1010

1111

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/cloud-foundry.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ In order to use the endpoint, a valid UAA token must be passed with the request.
1515
=== Disabling Extended Cloud Foundry Actuator Support
1616
If you want to fully disable the `/cloudfoundryapplication` endpoints, you can add the following setting to your `application.properties` file:
1717

18-
1918
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
2019
----
2120
management:

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[[actuator.enabling]]
22
== Enabling Production-ready Features
33
The {spring-boot-code}/spring-boot-project/spring-boot-actuator[`spring-boot-actuator`] module provides all of Spring Boot's production-ready features.
4-
The recommended way to enable the features is to add a dependency on the `spring-boot-starter-actuator` '`Starter`'.
4+
The recommended way to enable the features is to add a dependency on the `spring-boot-starter-actuator` "`Starter`".
55

66
.Definition of Actuator
77
****
88
An actuator is a manufacturing term that refers to a mechanical device for moving or controlling something.
99
Actuators can generate a large amount of motion from a small change.
1010
****
1111

12-
To add the actuator to a Maven based project, add the following '`Starter`' dependency:
12+
To add the actuator to a Maven-based project, add the following '`Starter`' dependency:
1313

1414
[source,xml,indent=0,subs="verbatim"]
1515
----

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/endpoints.adoc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The following technology-agnostic endpoints are available:
6363
Requires one or more `Liquibase` beans.
6464

6565
| `metrics`
66-
| Shows '`metrics`' information for the current application.
66+
| Shows "`metrics`" information for the current application.
6767

6868
| `mappings`
6969
| Displays a collated list of all `@RequestMapping` paths.
@@ -429,7 +429,7 @@ The following configuration permits `GET` and `POST` calls from the `example.com
429429
allowed-methods: "GET,POST"
430430
----
431431

432-
TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[CorsEndpointProperties] for a complete list of options.
432+
TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[`CorsEndpointProperties`] for a complete list of options.
433433

434434

435435

@@ -547,19 +547,19 @@ The HTTP method of the predicate is determined by the operation type, as shown i
547547
[[actuator.endpoints.implementing-custom.web.consumes-predicates]]
548548
===== Consumes
549549
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`.
550-
For all other operations the consumes clause is empty.
550+
For all other operations, the `consumes` clause is empty.
551551

552552

553553

554554
[[actuator.endpoints.implementing-custom.web.produces-predicates]]
555555
===== Produces
556-
The produces clause of the predicate can be determined by the `produces` attribute of the `@DeleteOperation`, `@ReadOperation`, and `@WriteOperation` annotations.
556+
The `produces` clause of the predicate can be determined by the `produces` attribute of the `@DeleteOperation`, `@ReadOperation`, and `@WriteOperation` annotations.
557557
The attribute is optional.
558-
If it is not used, the produces clause is determined automatically.
558+
If it is not used, the `produces` clause is determined automatically.
559559

560-
If the operation method returns `void` or `Void` the produces clause is empty.
561-
If the operation method returns a `org.springframework.core.io.Resource`, the produces clause is `application/octet-stream`.
562-
For all other operations the produces clause is `application/vnd.spring-boot.actuator.v2+json, application/json`.
560+
If the operation method returns `void` or `Void`, the `produces` clause is empty.
561+
If the operation method returns a `org.springframework.core.io.Resource`, the `produces` clause is `application/octet-stream`.
562+
For all other operations, the `produces` clause is `application/vnd.spring-boot.actuator.v2+json, application/json`.
563563

564564

565565

@@ -741,11 +741,11 @@ Additional `HealthIndicators` are available but not enabled by default:
741741

742742
| `livenessstate`
743743
| {spring-boot-actuator-module-code}/availability/LivenessStateHealthIndicator.java[`LivenessStateHealthIndicator`]
744-
| Exposes the "Liveness" application availability state.
744+
| Exposes the "`Liveness`" application availability state.
745745

746746
| `readinessstate`
747747
| {spring-boot-actuator-module-code}/availability/ReadinessStateHealthIndicator.java[`ReadinessStateHealthIndicator`]
748-
| Exposes the "Readiness" application availability state.
748+
| Exposes the "`Readiness`" application availability state.
749749
|===
750750

751751

@@ -886,7 +886,7 @@ Also, any `HealthIndicator` that is not handled explicitly is wrapped automatica
886886
==== Health Groups
887887
It's sometimes useful to organize health indicators into groups that can be used for different purposes.
888888

889-
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`.
889+
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`.
890890
For example, to create a group that includes only database indicators you can define the following:
891891

892892
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
@@ -1028,7 +1028,8 @@ This would make `liveness` available at `/livez` and `readiness` at `readyz` on
10281028

10291029
[[actuator.endpoints.kubernetes-probes.external-state]]
10301030
==== Checking External State with Kubernetes Probes
1031-
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.
1031+
Actuator configures the "`liveness`" and "`readiness`" probes as Health Groups.
1032+
This means that all the <<actuator#actuator.endpoints.health.groups, health groups features>> are available for them.
10321033
You can, for example, configure additional Health Indicators:
10331034

10341035
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,16 @@ The https://graphiteapp.org[Graphite server] host and port to use can be provide
294294

295295
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].
296296

297-
TIP: To take control over this behavior, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
297+
[TIP]
298+
====
299+
To take control over this behavior, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
298300
An auto-configured `GraphiteConfig` and `Clock` beans are provided unless you define your own:
299301
300302
[source,java,indent=0,subs="verbatim"]
301303
----
302304
include::{docs-java}/actuator/metrics/export/graphite/MyGraphiteConfiguration.java[]
303305
----
306+
====
304307

305308

306309

@@ -367,13 +370,16 @@ The domain to use can be provided using:
367370

368371
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].
369372

370-
TIP: To take control over this behavior, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`.
373+
[TIP]
374+
====
375+
To take control over this behavior, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`.
371376
An auto-configured `JmxConfig` and `Clock` beans are provided unless you define your own:
372377
373378
[source,java,indent=0,subs="verbatim"]
374379
----
375380
include::{docs-java}/actuator/metrics/export/jmx/MyJmxConfiguration.java[]
376381
----
382+
====
377383

378384

379385

@@ -854,7 +860,8 @@ Data source instrumentation results in gauges representing the currently active,
854860

855861
Metrics are also tagged by the name of the `DataSource` computed based on the bean name.
856862

857-
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.
863+
TIP: By default, Spring Boot provides metadata for all supported data sources.
864+
You can add additional `DataSourcePoolMetadataProvider` beans if your favorite data source is not supported.
858865
See `DataSourcePoolMetadataProvidersConfiguration` for examples.
859866

860867
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
935942

936943
[[actuator.metrics.supported.mongodb]]
937944
==== MongoDB Metrics
945+
This section briefly describes the available metrics for MongoDB.
938946

939947

940948

@@ -1168,10 +1176,11 @@ For more details on concepts behind `percentiles-histogram`, `percentiles` and `
11681176
[[actuator.metrics.endpoint]]
11691177
=== Metrics Endpoint
11701178
Spring Boot provides a `metrics` endpoint that can be used diagnostically to examine the metrics collected by an application.
1171-
The endpoint is not available by default and must be exposed, see <<actuator#actuator.endpoints.exposing,exposing endpoints>> for more details.
1179+
The endpoint is not available by default and must be exposed.
1180+
See <<actuator#actuator.endpoints.exposing,exposing endpoints>> for more details.
11721181

11731182
Navigating to `/actuator/metrics` displays a list of available meter names.
1174-
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`.
1183+
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`.
11751184

11761185
[TIP]
11771186
====

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/whats-next.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
== What to Read Next
33
You might want to read about graphing tools such as https://graphiteapp.org[Graphite].
44

5-
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>>_.
5+
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>>.

0 commit comments

Comments
 (0)