diff --git a/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/DefaultHttpClientObservationConvention.java b/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/DefaultHttpClientObservationConvention.java index 7ad657c90..d1e3983d3 100644 --- a/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/DefaultHttpClientObservationConvention.java +++ b/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/DefaultHttpClientObservationConvention.java @@ -46,15 +46,14 @@ public KeyValues getLowCardinalityKeyValues(HttpClientContext context) { return KeyValues.of( HttpClientObservationDocumentation.LowCardinalityKeys.METHOD.withValue(httpRequest.method()), HttpClientObservationDocumentation.LowCardinalityKeys.URI - .withValue(getUri(httpRequest, context.getResponse(), context.getUriMapper())), + .withValue(getUri(httpRequest, context.getUriMapper())), HttpClientObservationDocumentation.LowCardinalityKeys.STATUS .withValue(getStatus(context.getResponse())), HttpClientObservationDocumentation.LowCardinalityKeys.OUTCOME .withValue(getOutcome(context.getResponse()))); } - String getUri(HttpRequest request, @Nullable HttpResponse httpResponse, - Function uriMapper) { + String getUri(HttpRequest request, Function uriMapper) { return uriMapper.apply(request); } diff --git a/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/MicrometerHttpClient.java b/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/MicrometerHttpClient.java index 23970ce08..2aeb78a3d 100644 --- a/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/MicrometerHttpClient.java +++ b/micrometer-java11/src/main/java/io/micrometer/java11/instrument/binder/jdk/MicrometerHttpClient.java @@ -235,7 +235,7 @@ private void stopObservationOrTimer( instrumentation.stop(DefaultHttpClientObservationConvention.INSTANCE.getName(), "Timer for JDK's HttpClient", () -> Tags.of(HttpClientObservationDocumentation.LowCardinalityKeys.METHOD.asString(), request.method(), HttpClientObservationDocumentation.LowCardinalityKeys.URI.asString(), - DefaultHttpClientObservationConvention.INSTANCE.getUri(request, res, uriMapper), + DefaultHttpClientObservationConvention.INSTANCE.getUri(request, uriMapper), HttpClientObservationDocumentation.LowCardinalityKeys.STATUS.asString(), DefaultHttpClientObservationConvention.INSTANCE.getStatus(res), HttpClientObservationDocumentation.LowCardinalityKeys.OUTCOME.asString(),