Skip to content

Commit 1f48c71

Browse files
committed
nit changes
1 parent 841b27c commit 1f48c71

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

dd-java-agent/instrumentation/synapse-3.0/src/main/java/datadog/trace/instrumentation/synapse3/SynapseClientWorkerInstrumentation.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ public static void responseReceived(
9797
if (null != error && null != span) {
9898
DECORATE.onError(span, error);
9999
}
100+
101+
if (null != span) {
102+
if (null != httpResponse) {
103+
DECORATE.onResponse(span, httpResponse);
104+
}
105+
if (null != error) {
106+
DECORATE.onError(span, error);
107+
}
108+
}
100109
DECORATE.beforeFinish(scope.context());
101110
// no need to finish span because response event (which created the worker) does that
102111
scope.close();

dd-java-agent/instrumentation/undertow/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/ExchangeEndSpanListener.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ public void exchangeEvent(HttpServerExchange exchange, NextListener nextListener
3030
if (throwable != null) {
3131
DECORATE.onError(span, throwable);
3232
}
33-
3433
DECORATE.onResponse(span, exchange);
3534
DECORATE.beforeFinish(context);
36-
continuation.cancel();
3735
span.finish();
38-
nextListener.proceed();
3936
} else {
4037
DECORATE.beforeFinish(context);
41-
continuation.cancel();
42-
nextListener.proceed();
4338
}
39+
40+
continuation.cancel();
41+
nextListener.proceed();
4442
}
4543
}

0 commit comments

Comments
 (0)