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 004ec61a8341..f9a09098f27d 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 @@ -768,8 +768,9 @@ By default, Spring MVC related metrics are tagged with the following information | The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`) |=== -To add to the default tags, provide one or more ``@Bean``s that implement `WebMvcTagsContributor`. -To replace the default tags, provide a `@Bean` that implements `WebMvcTagsProvider`. +To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation` package. +To replace the default tags, provide a `@Bean` that implements `GlobalObservationConvention`. + TIP: In some cases, exceptions handled in web controllers are not recorded as request metrics tags. Applications can opt in and record exceptions by <>. @@ -807,8 +808,8 @@ By default, WebFlux related metrics are tagged with the following information: | The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`) |=== -To add to the default tags, provide one or more beans that implement `WebFluxTagsContributor`. -To replace the default tags, provide a bean that implements `WebFluxTagsProvider`. +To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation.reactive` package. +To replace the default tags, provide a `@Bean` that implements `GlobalObservationConvention`. TIP: In some cases, exceptions handled in controllers and handler functions are not recorded as request metrics tags. Applications can opt in and record exceptions by <>. @@ -882,8 +883,8 @@ By default, metrics generated by an instrumented client are tagged with the foll | The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`) |=== -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`. +To customize the tags when using `RestTemplate`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.http.client.observation` package. +To customize the tags when using `WebClient`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.web.reactive.function.client` package.