Prevent NPE
@@ -136,9 +136,11 @@ public class JettyHttpClient9TracingInterceptor
if (this.context != null) {
Span span = Span.fromContext(this.context);
HttpField agentField = request.getHeaders().getField(HttpHeader.USER_AGENT);
+ if (agentField != null) {
span.setAttribute(SemanticAttributes.HTTP_USER_AGENT, agentField.getValue());
}
}
+ }
@Override
public void onComplete(Result result) {
