From 7d983be769826c0d141129a419d56d9a765d7fc2 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 31 Aug 2022 14:36:07 +0100 Subject: [PATCH] Clarify docs on disabling HTTP client request metrics Closes gh-32136 --- .../src/docs/asciidoc/actuator/metrics.adoc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc index c9dfec3648..962923b464 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc @@ -864,6 +864,8 @@ By default, metrics generated by an instrumented client are tagged with the foll To customize the tags, and depending on your choice of client, you can provide a `@Bean` that implements `RestTemplateExchangeTagsProvider` or `WebClientExchangeTagsProvider`. There are convenience static functions in `RestTemplateExchangeTags` and `WebClientExchangeTags`. +If you do not want to record metrics for all `RestTemplate` and `WebClient` requests, set configprop:management.metrics.web.client.request.autotime.enabled[] to `false`. + [[actuator.metrics.supported.tomcat]] @@ -1181,9 +1183,9 @@ As the order of common tags cannot be guaranteed by using this approach, Graphit [[actuator.metrics.customizing.per-meter-properties]] ==== Per-meter Properties -In addition to `MeterFilter` beans, you can apply a limited set of customization on a per-meter basis by using properties. -Per-meter customizations apply to any meter IDs that start with the given name. -The following example disables any meters that have an ID starting with `example.remote` +In addition to `MeterFilter` beans, you can apply a limited set of customization on a per-meter basis using properties. +Per-meter customizations are applied, using Spring Boot's `PropertiesMeterFilter`, to any meter IDs that start with the given name. +The following example filters out any meters that have an ID starting with `example.remote`. [source,yaml,indent=0,subs="verbatim",configprops,configblocks] ---- @@ -1201,7 +1203,8 @@ The following properties allow per-meter customization: | Property | Description | configprop:management.metrics.enable[] -| Whether to prevent meters from emitting any metrics. +| Whether to accept meters with certain IDs. + Meters that are not accepted are filtered from the `MeterRegistry`. | configprop:management.metrics.distribution.percentiles-histogram[] | Whether to publish a histogram suitable for computing aggregable (across dimension) percentile approximations.