From 9eeeebcd53b93a126d5b831ad6f416fa78b29ab3 Mon Sep 17 00:00:00 2001 From: Michael McFadyen Date: Thu, 17 Jan 2019 12:14:42 -0500 Subject: [PATCH] Update 'HTTP Client Metrics' reference documentation Since gh-#5594, the 'outcome' tag has been introduced for HTTP clients. This commit updates the reference documentation accordingly. Closes gh-15725 --- .../asciidoc/production-ready-features.adoc | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index f595a0df7d..26dd7cce2f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1963,11 +1963,28 @@ customized by setting the `management.metrics.web.client.requests-metric-name` p By default, metrics generated by an instrumented client are tagged with the following information: -* `method`, the request's method (for example, `GET` or `POST`). -* `uri`, the request's URI template prior to variable substitution, if possible (for -example, `/api/person/{id}`). -* `status`, the response's HTTP status code (for example, `200` or `500`). -* `clientName`, the host portion of the URI. +|=== +|Tag |Description + +|`clientName` +|Host portion of the URI + +|`method` +|Request's method (for example, `GET` or `POST`) + +|`outcome` +|Request's outcome based on the status code of the response. 1xx is +`INFORMATIONAL`, 2xx is `SUCCESS`, 3xx is `REDIRECTION`, 4xx `CLIENT_ERROR`, and 5xx is +`SERVER_ERROR` + +|`status` +|Response's HTTP status code (for example, `200` or `500`) + +|`uri` +|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