Skip to content

Commit 4be5bfb

Browse files
committed
WIP: vertx http.route issue
1 parent 97c4367 commit 4be5bfb

File tree

1 file changed

+5
-4
lines changed
  • dd-java-agent/instrumentation/vertx-web-3.4/src/main/java/datadog/trace/instrumentation/vertx_3_4/server

1 file changed

+5
-4
lines changed

dd-java-agent/instrumentation/vertx-web-3.4/src/main/java/datadog/trace/instrumentation/vertx_3_4/server/EndHandlerWrapper.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ public void handle(final Void event) {
2424
AgentSpan span = routingContext.get(HANDLER_SPAN_CONTEXT_KEY);
2525
AgentSpan parentSpan = routingContext.get(PARENT_SPAN_CONTEXT_KEY);
2626
String path = routingContext.get(ROUTE_CONTEXT_KEY);
27+
if (path != null && parentSpan != null) {
28+
// XXX: Calling this early so that http.route is seen by beforeFinish hooks.
29+
HTTP_RESOURCE_DECORATOR.withRoute(
30+
parentSpan, routingContext.request().rawMethod(), path, true);
31+
}
2732
try {
2833
if (actual != null) {
2934
actual.handle(event);
3035
}
3136
} finally {
32-
if (path != null && parentSpan != null) {
33-
HTTP_RESOURCE_DECORATOR.withRoute(
34-
parentSpan, routingContext.request().rawMethod(), path, true);
35-
}
3637
if (span != null) {
3738
DECORATE.onResponse(span, routingContext.response());
3839
span.finish();

0 commit comments

Comments
 (0)