You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preceding example uses `EndpointRequest.toAnyEndpoint()` to match a request to any endpoint and then ensures that all have the `ENDPOINT_ADMIN` role.
337
334
Several other matcher methods are also available on `EndpointRequest`.
@@ -351,10 +348,7 @@ You can do so by changing the configprop:management.endpoints.web.exposure.inclu
351
348
352
349
Additionally, if Spring Security is present, you would need to add custom security configuration that allows unauthenticated access to the endpoints, as the following example shows:
NOTE: In both of the preceding examples, the configuration applies only to the actuator endpoints.
360
354
Since Spring Boot's security configuration backs off completely in the presence of any `SecurityFilterChain` bean, you need to configure an additional `SecurityFilterChain` bean with rules that apply to the rest of the application.
@@ -443,10 +437,7 @@ If both Jersey and Spring MVC are available, Spring MVC is used.
443
437
444
438
The following example exposes a read operation that returns a custom object:
NOTE: The identifier for a given `HealthIndicator` is the name of the bean without the `HealthIndicator` suffix, if it exists.
768
753
In the preceding example, the health information is available in an entry named `my`.
@@ -837,10 +822,7 @@ If you need to register a regular `HealthContributor`, you should wrap it with `
837
822
To provide custom health information from a reactive API, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] interface.
838
823
The following code shows a sample `ReactiveHealthIndicator` implementation:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc
+12-48
Original file line number
Diff line number
Diff line change
@@ -65,17 +65,11 @@ Spring Boot also adds any auto-configured registries to the global static compos
65
65
66
66
You can register any number of `MeterRegistryCustomizer` beans to further configure the registry, such as applying common tags, before any meters are registered with the registry:
Spring Boot also <<actuator#actuator.metrics.supported,configures built-in instrumentation>> that you can control through configuration or dedicated annotation markers.
81
75
@@ -308,10 +302,7 @@ Micrometer provides a default `HierarchicalNameMapper` that governs how a dimens
308
302
To take control over this behavior, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
309
303
An auto-configured `GraphiteConfig` and `Clock` beans are provided unless you define your own:
Using a `MeterBinder` ensures that the correct dependency relationships are set up and that the bean is available when the metric's value is retrieved.
1169
1136
A `MeterBinder` implementation can also be useful if you find that you repeatedly instrument a suite of metrics across components or applications.
@@ -1178,10 +1145,7 @@ If you need to apply customizations to specific `Meter` instances, you can use t
1178
1145
1179
1146
For example, if you want to rename the `mytag.region` tag to `mytag.area` for all meter IDs beginning with `com.example`, you can do the following:
This exposes three properties where `my.server.name` has no default and `my.server.ip` and `my.server.port` defaults to `"127.0.0.1"` and `9797` respectively.
78
75
The Javadoc on fields is used to populate the `description` attribute. For instance, the description of `my.server.ip` is "IP address to listen to.".
@@ -86,10 +83,7 @@ Also, the annotation processor cannot auto-detect default values for ``Enum``s a
86
83
For cases where the default value could not be detected, <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,manual metadata>> should be provided.
In order to document default values for properties in the class above, you could add the following content to <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
95
89
@@ -117,10 +111,7 @@ The annotation processor automatically considers inner classes as nested propert
117
111
Rather than documenting the `ip` and `port` at the root of the namespace, we could create a sub-namespace for it.
The preceding example produces metadata information for `my.server.name`, `my.server.host.ip`, and `my.server.host.port` properties.
126
117
You can use the `@NestedConfigurationProperty` annotation on a field to indicate that a regular (non-inner) class should be treated as if it were nested.
The magic values are (in this example) are `sample1` and `sample2`.
27
24
In order to offer additional content assistance for the keys, you could add the following JSON to <<configuration-metadata#configuration-metadata.annotation-processor.adding-additional-metadata,the manual metadata of the module>>:
0 commit comments