Skip to content

Commit eee5c47

Browse files
committed
post-review changes
1 parent 8957f7a commit eee5c47

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

instrumentation/jetty-httpclient/jetty-httpclient-9.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jetty/httpclient/v9_2/JettyHttpClient9Instrumentation.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,16 @@ public AdviceLocals(Context context, Scope scope) {
5959
@Advice.OnMethodEnter(suppress = Throwable.class)
6060
public static Object[] addTracingEnter(
6161
@Advice.Argument(value = 0) HttpRequest httpRequest,
62-
@Advice.Argument(1) List<Response.ResponseListener> originalListeners) {
62+
@Advice.Argument(1) List<Response.ResponseListener> listeners) {
6363

64-
List<Response.ResponseListener> listeners = originalListeners;
6564
Context parentContext = currentContext();
66-
Context context =
67-
JettyClientTracingListener.handleRequest(parentContext, httpRequest, instrumenter());
65+
Context context = JettyClientTracingListener.handleRequest(parentContext, httpRequest, instrumenter());
6866
if (context == null) {
6967
return new Object[] {null, listeners};
7068
}
7169

72-
listeners = wrapResponseListeners(parentContext, listeners);
73-
return new Object[] {new AdviceLocals(context, context.makeCurrent()), listeners};
70+
List<Response.ResponseListener> wrappedListeners = wrapResponseListeners(parentContext, listeners);
71+
return new Object[] {new AdviceLocals(context, context.makeCurrent()), wrappedListeners};
7472
}
7573

7674
@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)

0 commit comments

Comments
 (0)