Skip to content

[java] Fix test_log_generation_enabled for vertx3/vertx4 after AIDM-583 fix#6996

Merged
jandro996 merged 4 commits into
mainfrom
alejandro.gonzalez/APPSEC-61873-vertx
May 21, 2026
Merged

[java] Fix test_log_generation_enabled for vertx3/vertx4 after AIDM-583 fix#6996
jandro996 merged 4 commits into
mainfrom
alejandro.gonzalez/APPSEC-61873-vertx

Conversation

@jandro996
Copy link
Copy Markdown
Member

@jandro996 jandro996 commented May 21, 2026

Why

test_log_generation_enabled[vertx3] fails in dd-trace-java CI for PR #11268, which fixes AIDM-583.

The full chain

AIDM-583 is a bug where NettyMultipartHelper.collectBodyData() calls NettyFileUpload.getHttpDataType(), which throws UnsupportedOperationException because Vert.x's NettyFileUpload doesn't implement that method. When AppSec tests in the DEFAULT scenario send multipart requests to the vertx3 /waf endpoint, Netty's HttpPostMultipartRequestDecoder encounters these objects, and the exception escapes to ByteBuddy's suppress = Throwable.class handler, which logs:

"Failed to handle exception in instrumentation for io.netty.handler.codec.http.multipart.HttpPostMultipartRequestDecoder"

DDTelemetryLogger collects any agent log that carries a Throwable, so this debug-level log becomes a telemetry logs payload. This was:

  • the only source of telemetry logs for vertx3/vertx4 in the DEFAULT scenario
  • already tracked as AIDM-583 and explicitly allowed in test_java_telemetry_logs
  • accidentally making test_log_generation_enabled pass

After DataDog/dd-trace-java#11268 adds catch (UnsupportedOperationException ignored) in collectBodyData(), the exception is silenced before reaching the advice handler. No more telemetry logs from this path.

What this PR does

Testing

Verified locally by building the vertx3 weblog with the dd-trace-java#11268 agent jar and running:

TEST_LIBRARY=java ./run.sh tests/test_telemetry.py::Test_Log_Generation::test_log_generation_enabled

Result: 1 xfailed (test correctly skipped as missing_feature for vertx3).

…/vertx4; fix vertx3 build

The test was previously passing for vertx3/vertx4 only because a bug in
NettyMultipartHelper caused UnsupportedOperationException from Vert.x's
NettyFileUpload.getHttpDataType() to bubble up to ByteBuddy's suppress handler,
which logged it via ExceptionLogger with a Throwable attached — the DDTelemetryLogger
then collected it as a telemetry log payload. After fixing that bug in
dd-trace-java#11268, vertx3/vertx4 no longer produce agent telemetry logs in
the DEFAULT scenario, matching the behavior of play, akka-http, etc.

Also add slf4j-api + slf4j-jdk14 to vertx3/pom.xml to fix a compilation error
introduced in #6882 where Api10RouteProvider.java was added with an SLF4J import
but without the required dependency.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

CODEOWNERS have been resolved as:

manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
tests/test_library_logs.py                                              @DataDog/system-tests-core

jandro996 added 2 commits May 21, 2026 13:40
…d-trace-java#11268

The UnsupportedOperationException from NettyFileUpload.getHttpDataType() no longer
propagates to the advice exception handler after the fix in dd-trace-java#11268.
@jandro996 jandro996 changed the title [java] Mark test_log_generation_enabled as missing_feature for vertx3/vertx4; fix vertx3 build [java] Fix test_log_generation_enabled for vertx3/vertx4 after AIDM-583 fix May 21, 2026
@datadog-prod-us1-6
Copy link
Copy Markdown

datadog-prod-us1-6 Bot commented May 21, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c872f2a | Docs | Datadog PR Page | Give us feedback!

The fix for AIDM-583 lives in dd-trace-java#11268 (not yet merged).
System-tests CI runs with the production agent, where the error still
occurs. Keep the allowed_patterns entry until the tracer fix reaches prod.
@jandro996 jandro996 marked this pull request as ready for review May 21, 2026 13:23
@jandro996 jandro996 requested review from a team as code owners May 21, 2026 13:23
@jandro996 jandro996 merged commit 4d0bd5d into main May 21, 2026
419 checks passed
@jandro996 jandro996 deleted the alejandro.gonzalez/APPSEC-61873-vertx branch May 21, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants