Skip to content

Commit 5449673

Browse files
authored
Review fixes for async-http-client-common-1.8:javaagent (open-telemetry#18102)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
1 parent 4a62aff commit 5449673

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

instrumentation/async-http-client/async-http-client-common-1.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/v1_8/AsyncHttpClientHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ public interface AsyncHttpClientHelper {
2323
* Get the server address (host) from the request.
2424
*
2525
* @param request the HTTP request
26-
* @return the server address
26+
* @return the server address, or {@code null} if the request URI has no host
2727
*/
28+
@Nullable
2829
String getServerAddress(Request request);
2930

3031
/**

instrumentation/async-http-client/async-http-client-common-1.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/v1_8/AsyncHttpClientHttpAttributesGetter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public List<String> getHttpResponseHeader(Request request, Response response, St
5050
}
5151

5252
@Override
53+
@Nullable
5354
public String getServerAddress(Request request) {
5455
return helper.getServerAddress(request);
5556
}

0 commit comments

Comments
 (0)