Skip to content

Commit

Permalink
Clarify docs on disabling HTTP client request metrics
Browse files Browse the repository at this point in the history
Closes gh-32136
  • Loading branch information
wilkinsona committed Aug 31, 2022
1 parent adc4e05 commit 7d983be
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -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]]
Expand Down Expand Up @@ -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]
----
Expand All @@ -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.
Expand Down

0 comments on commit 7d983be

Please sign in to comment.