Fix Micrometer tag providers after HttpStatus changes

Since SPR-16898, `HttpStatus.toString()` has changed and we should
instead rely on `HttpStatus.value()` to get the HTTP status number.
This commit is contained in:
Brian Clozel 2018-06-19 16:05:40 +02:00
parent 8365d53554
commit cc894ce4f2
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ public final class WebClientExchangeTags {
* @return the status tag
*/
public static Tag status(ClientResponse response) {
return Tag.of("status", response.statusCode().toString());
return Tag.of("status", String.valueOf(response.statusCode().value()));
}
/**

View File

@ -69,7 +69,7 @@ public final class WebFluxTags {
if (status == null) {
status = HttpStatus.OK;
}
return Tag.of("status", status.toString());
return Tag.of("status", String.valueOf(status.value()));
}
/**