Add Nullable to Instrumenter API response args
MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/AttributesExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/AttributesExtractor.java
@@ -10,6 +10,7 @@ import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.instrumentation.api.instrumenter.db.DbAttributesExtractor;
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpAttributesExtractor;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetAttributesExtractor;
+import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Extractor of {@link io.opentelemetry.api.common.Attributes} for a given request and response.
@@ -34,7 +35,8 @@ public abstract class AttributesExtractor<REQUEST, RESPONSE> {
* Extracts attributes from the {@link REQUEST} and {@link RESPONSE} into the {@link
* AttributesBuilder} at the end of a request.
*/
- protected abstract void onEnd(AttributesBuilder attributes, REQUEST request, RESPONSE response);
+ protected abstract void onEnd(
+ AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response);
/**
* Sets the {@code value} with the given {@code key} to the {@link AttributesBuilder} if {@code

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/DefaultSpanStatusExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/DefaultSpanStatusExtractor.java
@@ -14,7 +14,8 @@ final class DefaultSpanStatusExtractor<REQUEST, RESPONSE>
static final SpanStatusExtractor<Object, Object> INSTANCE = new DefaultSpanStatusExtractor<>();
@Override
- public StatusCode extract(REQUEST request, RESPONSE response, @Nullable Throwable error) {
+ public StatusCode extract(
+ REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error) {
if (error != null) {
return StatusCode.ERROR;
}

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/SpanStatusExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/SpanStatusExtractor.java
@@ -25,5 +25,5 @@ public interface SpanStatusExtractor<REQUEST, RESPONSE> {
}
/** Returns the {@link StatusCode}. */
- StatusCode extract(REQUEST request, RESPONSE response, @Nullable Throwable error);
+ StatusCode extract(REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error);
}

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/db/DbAttributesExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/db/DbAttributesExtractor.java
@@ -31,7 +31,8 @@ public abstract class DbAttributesExtractor<REQUEST> extends AttributesExtractor
}
@Override
- protected final void onEnd(AttributesBuilder attributes, REQUEST request, Void unused) {}
+ protected final void onEnd(
+ AttributesBuilder attributes, REQUEST request, @Nullable Void unused) {}
@Nullable
protected abstract String system(REQUEST request);

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpAttributesExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpAttributesExtractor.java
package io.opentelemetry.instrumentation.api.instrumenter.http;
import io.opentelemetry.api.common.AttributesBuilder;
+import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
+import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -34,7 +36,8 @@ public abstract class HttpAttributesExtractor<REQUEST, RESPONSE>
}
@Override
- protected final void onEnd(AttributesBuilder attributes, REQUEST request, RESPONSE response) {
+ protected final void onEnd(
+ AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response) {
set(
attributes,
SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH,
@@ -43,11 +46,14 @@ public abstract class HttpAttributesExtractor<REQUEST, RESPONSE>
attributes,
SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,
requestContentLengthUncompressed(request, response));
+ set(attributes, SemanticAttributes.HTTP_FLAVOR, flavor(request, response));
+ set(attributes, SemanticAttributes.HTTP_SERVER_NAME, serverName(request, response));
+ set(attributes, SemanticAttributes.HTTP_CLIENT_IP, clientIp(request, response));
+ if (response != null) {
Integer statusCode = statusCode(request, response);
if (statusCode != null) {
set(attributes, SemanticAttributes.HTTP_STATUS_CODE, (long) statusCode);
}
- set(attributes, SemanticAttributes.HTTP_FLAVOR, flavor(request, response));
set(
attributes,
SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH,
@@ -56,8 +62,7 @@ public abstract class HttpAttributesExtractor<REQUEST, RESPONSE>
attributes,
SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,
responseContentLengthUncompressed(request, response));
- set(attributes, SemanticAttributes.HTTP_SERVER_NAME, serverName(request, response));
- set(attributes, SemanticAttributes.HTTP_CLIENT_IP, clientIp(request, response));
+ }
}
// Attributes that always exist in a request
@@ -85,27 +90,76 @@ public abstract class HttpAttributesExtractor<REQUEST, RESPONSE>
// Attributes which are not always available when the request is ready.
+ /**
+ * Extracts the {@code http.request_content_length} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
+ * {@code response} is {@code null} or not.
+ */
@Nullable
- protected abstract Long requestContentLength(REQUEST request, RESPONSE response);
+ protected abstract Long requestContentLength(REQUEST request, @Nullable RESPONSE response);
+ /**
+ * Extracts the {@code http.request_content_length_uncompressed} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
+ * {@code response} is {@code null} or not.
+ */
@Nullable
- protected abstract Long requestContentLengthUncompressed(REQUEST request, RESPONSE response);
+ protected abstract Long requestContentLengthUncompressed(
+ REQUEST request, @Nullable RESPONSE response);
+ /**
+ * Extracts the {@code http.flavor} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
+ * {@code response} is {@code null} or not.
+ */
@Nullable
- protected abstract Integer statusCode(REQUEST request, RESPONSE response);
+ protected abstract String flavor(REQUEST request, @Nullable RESPONSE response);
+ /**
+ * Extracts the {@code http.server_name} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
+ * {@code response} is {@code null} or not.
+ */
@Nullable
- protected abstract String flavor(REQUEST request, RESPONSE response);
+ protected abstract String serverName(REQUEST request, @Nullable RESPONSE response);
+ /**
+ * Extracts the {@code http.client_ip} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
+ * {@code response} is {@code null} or not.
+ */
@Nullable
- protected abstract Long responseContentLength(REQUEST request, RESPONSE response);
+ protected abstract String clientIp(REQUEST request, @Nullable RESPONSE response);
+ /**
+ * Extracts the {@code http.status_code} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, only when
+ * {@code response} is non-{@code null}.
+ */
@Nullable
- protected abstract Long responseContentLengthUncompressed(REQUEST request, RESPONSE response);
+ protected abstract Integer statusCode(REQUEST request, RESPONSE response);
+ /**
+ * Extracts the {@code http.response_content_length} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, only when
+ * {@code response} is non-{@code null}.
+ */
@Nullable
- protected abstract String serverName(REQUEST request, RESPONSE response);
+ protected abstract Long responseContentLength(REQUEST request, RESPONSE response);
+ /**
+ * Extracts the {@code http.response_content_length_uncompressed} span attribute.
+ *
+ * <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, only when
+ * {@code response} is non-{@code null}.
+ */
@Nullable
- protected abstract String clientIp(REQUEST request, RESPONSE response);
+ protected abstract Long responseContentLengthUncompressed(REQUEST request, RESPONSE response);
}

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpSpanStatusExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpSpanStatusExtractor.java
@@ -8,6 +8,7 @@ package io.opentelemetry.instrumentation.api.instrumenter.http;
import io.opentelemetry.api.trace.StatusCode;
import io.opentelemetry.instrumentation.api.instrumenter.SpanStatusExtractor;
import io.opentelemetry.instrumentation.api.tracer.HttpStatusConverter;
+import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Extractor of the <a
@@ -35,11 +36,13 @@ public final class HttpSpanStatusExtractor<REQUEST, RESPONSE>
}
@Override
- public StatusCode extract(REQUEST request, RESPONSE response, Throwable error) {
+ public StatusCode extract(REQUEST request, @Nullable RESPONSE response, Throwable error) {
+ if (response != null) {
Integer statusCode = attributesExtractor.statusCode(request, response);
if (statusCode != null) {
return HttpStatusConverter.statusFromHttpStatus(statusCode);
}
+ }
return SpanStatusExtractor.getDefault().extract(request, response, error);
}
}

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesExtractor.java
@@ -53,7 +53,8 @@ public abstract class MessagingAttributesExtractor<REQUEST, RESPONSE>
}
@Override
- protected final void onEnd(AttributesBuilder attributes, REQUEST request, RESPONSE response) {
+ protected final void onEnd(
+ AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response) {
set(attributes, SemanticAttributes.MESSAGING_MESSAGE_ID, messageId(request, response));
}
@@ -90,5 +91,5 @@ public abstract class MessagingAttributesExtractor<REQUEST, RESPONSE>
protected abstract MessageOperation operation(REQUEST request);
@Nullable
- protected abstract String messageId(REQUEST request, RESPONSE response);
+ protected abstract String messageId(REQUEST request, @Nullable RESPONSE response);
}

MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetAttributesExtractor.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetAttributesExtractor.java
@@ -31,7 +31,8 @@ public abstract class NetAttributesExtractor<REQUEST, RESPONSE>
}
@Override
- protected final void onEnd(AttributesBuilder attributes, REQUEST request, RESPONSE response) {
+ protected final void onEnd(
+ AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response) {
set(attributes, SemanticAttributes.NET_PEER_IP, peerIp(request, response));
set(attributes, SemanticAttributes.NET_PEER_NAME, peerName(request, response));
Integer peerPort = peerPort(request, response);

MODIFY
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientHttpAttributesExtractor.java
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientHttpAttributesExtractor.java
@@ -15,7 +15,7 @@ import org.apache.commons.httpclient.StatusLine;
import org.checkerframework.checker.nullness.qual.Nullable;
final class ApacheHttpClientHttpAttributesExtractor
- extends HttpAttributesExtractor<HttpMethod, Void> {
+ extends HttpAttributesExtractor<HttpMethod, HttpMethod> {
@Override
protected String method(HttpMethod httpMethod) {
@@ -63,26 +63,27 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected Long requestContentLength(HttpMethod httpMethod, Void unused) {
+ protected Long requestContentLength(HttpMethod httpMethod, @Nullable HttpMethod response) {
return null;
}
@Override
@Nullable
- protected Long requestContentLengthUncompressed(HttpMethod httpMethod, Void unused) {
+ protected Long requestContentLengthUncompressed(
+ HttpMethod httpMethod, @Nullable HttpMethod response) {
return null;
}
@Override
@Nullable
- protected Integer statusCode(HttpMethod httpMethod, Void unused) {
- StatusLine statusLine = httpMethod.getStatusLine();
+ protected Integer statusCode(HttpMethod request, HttpMethod response) {
+ StatusLine statusLine = response.getStatusLine();
return statusLine == null ? null : statusLine.getStatusCode();
}
@Override
@Nullable
- protected String flavor(HttpMethod httpMethod, Void unused) {
+ protected String flavor(HttpMethod httpMethod, @Nullable HttpMethod response) {
if (httpMethod instanceof HttpMethodBase) {
return ((HttpMethodBase) httpMethod).isHttp11()
? SemanticAttributes.HttpFlavorValues.HTTP_1_1
@@ -93,19 +94,19 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected Long responseContentLength(HttpMethod httpMethod, Void unused) {
+ protected Long responseContentLength(HttpMethod httpMethod, HttpMethod response) {
return null;
}
@Override
@Nullable
- protected Long responseContentLengthUncompressed(HttpMethod httpMethod, Void unused) {
+ protected Long responseContentLengthUncompressed(HttpMethod httpMethod, HttpMethod response) {
return null;
}
@Override
@Nullable
- protected String serverName(HttpMethod httpMethod, Void unused) {
+ protected String serverName(HttpMethod httpMethod, @Nullable HttpMethod response) {
return null;
}
@@ -117,7 +118,7 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected String clientIp(HttpMethod httpMethod, Void unused) {
+ protected String clientIp(HttpMethod httpMethod, @Nullable HttpMethod response) {
return null;
}

MODIFY
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientInstrumentationModule.java
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientInstrumentationModule.java
@@ -87,7 +87,7 @@ public class ApacheHttpClientInstrumentationModule extends InstrumentationModule
}
scope.close();
- instrumenter().end(context, httpMethod, null, throwable);
+ instrumenter().end(context, httpMethod, httpMethod, throwable);
}
}
}

MODIFY
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientInstrumenters.java
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientInstrumenters.java
@@ -18,18 +18,18 @@ public final class ApacheHttpClientInstrumenters {
private static final String INSTRUMENTATION_NAME =
"io.opentelemetry.javaagent.apache-httpclient-2.0";
- private static final Instrumenter<HttpMethod, Void> INSTRUMENTER;
+ private static final Instrumenter<HttpMethod, HttpMethod> INSTRUMENTER;
static {
- HttpAttributesExtractor<HttpMethod, Void> httpAttributesExtractor =
+ HttpAttributesExtractor<HttpMethod, HttpMethod> httpAttributesExtractor =
new ApacheHttpClientHttpAttributesExtractor();
SpanNameExtractor<? super HttpMethod> spanNameExtractor =
HttpSpanNameExtractor.create(httpAttributesExtractor);
- SpanStatusExtractor<? super HttpMethod, ? super Void> spanStatusExtractor =
+ SpanStatusExtractor<? super HttpMethod, ? super HttpMethod> spanStatusExtractor =
HttpSpanStatusExtractor.create(httpAttributesExtractor);
INSTRUMENTER =
- Instrumenter.<HttpMethod, Void>newBuilder(
+ Instrumenter.<HttpMethod, HttpMethod>newBuilder(
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, spanNameExtractor)
.setSpanStatusExtractor(spanStatusExtractor)
.addAttributesExtractor(httpAttributesExtractor)
@@ -37,7 +37,7 @@ public final class ApacheHttpClientInstrumenters {
.newClientInstrumenter(new HttpHeaderSetter());
}
- public static Instrumenter<HttpMethod, Void> instrumenter() {
+ public static Instrumenter<HttpMethod, HttpMethod> instrumenter() {
return INSTRUMENTER;
}

MODIFY
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesExtractor.java
instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesExtractor.java
@@ -12,27 +12,27 @@ import org.apache.commons.httpclient.HttpMethod;
import org.checkerframework.checker.nullness.qual.Nullable;
final class ApacheHttpClientNetAttributesExtractor
- extends NetAttributesExtractor<HttpMethod, Void> {
+ extends NetAttributesExtractor<HttpMethod, HttpMethod> {
@Override
- protected String transport(HttpMethod httpMethod) {
+ protected String transport(HttpMethod request) {
return SemanticAttributes.NetTransportValues.IP_TCP;
}
@Override
- protected @Nullable String peerName(HttpMethod httpMethod, @Nullable Void unused) {
- HostConfiguration hostConfiguration = httpMethod.getHostConfiguration();
+ protected @Nullable String peerName(HttpMethod request, @Nullable HttpMethod response) {
+ HostConfiguration hostConfiguration = request.getHostConfiguration();
return hostConfiguration != null ? hostConfiguration.getHost() : null;
}
@Override
- protected @Nullable Integer peerPort(HttpMethod httpMethod, @Nullable Void unused) {
- HostConfiguration hostConfiguration = httpMethod.getHostConfiguration();
+ protected @Nullable Integer peerPort(HttpMethod request, @Nullable HttpMethod response) {
+ HostConfiguration hostConfiguration = request.getHostConfiguration();
return hostConfiguration != null ? hostConfiguration.getPort() : null;
}
@Override
- protected @Nullable String peerIp(HttpMethod httpMethod, @Nullable Void unused) {
+ protected @Nullable String peerIp(HttpMethod request, @Nullable HttpMethod response) {
return null;
}
}

MODIFY
instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientHttpAttributesExtractor.java
instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientHttpAttributesExtractor.java
@@ -71,27 +71,25 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected Long requestContentLength(HttpUriRequest request, HttpResponse unused) {
+ protected Long requestContentLength(HttpUriRequest request, @Nullable HttpResponse response) {
return null;
}
@Override
@Nullable
- protected Long requestContentLengthUncompressed(HttpUriRequest request, HttpResponse unused) {
+ protected Long requestContentLengthUncompressed(
+ HttpUriRequest request, @Nullable HttpResponse response) {
return null;
}
@Override
protected Integer statusCode(HttpUriRequest request, HttpResponse response) {
- if (response == null) {
- return null;
- }
return response.getStatusLine().getStatusCode();
}
@Override
@Nullable
- protected String flavor(HttpUriRequest request, HttpResponse response) {
+ protected String flavor(HttpUriRequest request, @Nullable HttpResponse response) {
ProtocolVersion protocolVersion = request.getRequestLine().getProtocolVersion();
String protocol = protocolVersion.getProtocol();
if (!protocol.equals("HTTP")) {
@@ -126,7 +124,7 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected String serverName(HttpUriRequest request, HttpResponse response) {
+ protected String serverName(HttpUriRequest request, @Nullable HttpResponse response) {
return null;
}
@@ -138,7 +136,7 @@ final class ApacheHttpClientHttpAttributesExtractor
@Override
@Nullable
- protected String clientIp(HttpUriRequest request, HttpResponse response) {
+ protected String clientIp(HttpUriRequest request, @Nullable HttpResponse response) {
return null;
}
}

MODIFY
instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaHttpAttributesExtractor.java
instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaHttpAttributesExtractor.java
@@ -53,13 +53,18 @@ final class ArmeriaHttpAttributesExtractor
}
@Override
- protected Long requestContentLength(RequestContext ctx, RequestLog requestLog) {
+ @Nullable
+ protected Long requestContentLength(RequestContext ctx, @Nullable RequestLog requestLog) {
+ if (requestLog == null) {
+ return null;
+ }
return requestLog.requestLength();
}
@Override
@Nullable
- protected Long requestContentLengthUncompressed(RequestContext ctx, RequestLog requestLog) {
+ protected Long requestContentLengthUncompressed(
+ RequestContext ctx, @Nullable RequestLog requestLog) {
return null;
}
@@ -74,7 +79,7 @@ final class ArmeriaHttpAttributesExtractor
}
@Override
- protected String flavor(RequestContext ctx, RequestLog requestLog) {
+ protected String flavor(RequestContext ctx, @Nullable RequestLog requestLog) {
SessionProtocol protocol = ctx.sessionProtocol();
if (protocol.isMultiplex()) {
return SemanticAttributes.HttpFlavorValues.HTTP_2_0;
@@ -96,7 +101,7 @@ final class ArmeriaHttpAttributesExtractor
@Override
@Nullable
- protected String serverName(RequestContext ctx, RequestLog requestLog) {
+ protected String serverName(RequestContext ctx, @Nullable RequestLog requestLog) {
if (ctx instanceof ServiceRequestContext) {
return ((ServiceRequestContext) ctx).config().virtualHost().hostnamePattern();
}
@@ -114,7 +119,7 @@ final class ArmeriaHttpAttributesExtractor
@Override
@Nullable
- protected String clientIp(RequestContext ctx, RequestLog requestLog) {
+ protected String clientIp(RequestContext ctx, @Nullable RequestLog requestLog) {
return null;
}

Add Nullable to Instrumenter API response args (#3041)