Skip to content

Commit 665badc

Browse files
Add comment to the call depth usage in vert.x
1 parent 5ea23d5 commit 665badc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dd-java-agent/instrumentation/vertx-web-4.0/src/main/java/datadog/trace/instrumentation/vertx_4_0/server/RoutingContextJsonAdvice.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ static void after(
3131
@ActiveRequestContext RequestContext reqCtx,
3232
@Advice.Thrown(readOnly = false) Throwable throwable) {
3333

34+
// in newer versions of vert.x rc.getBodyAsJson() calls internally rc.body().asJsonObject()
35+
// so we need to prevent sending the body twice to the WAF
3436
if (CallDepthThreadLocalMap.decrementCallDepth(RoutingContext.class) != 0) {
3537
return;
3638
}

0 commit comments

Comments
 (0)