-
Notifications
You must be signed in to change notification settings - Fork 320
3143 add support for vertx web 4 #3557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3143 add support for vertx web 4 #3557
Conversation
|
Thanks @LuboViluda, I'm going to try to review this this week but unfortunately the vertx integrations are large so it may take a while |
devinsba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version numbers will need to be addressed. Then just the one question
...adog/trace/instrumentation/vertx_4_0/server/HttpServerResponseEndHandlerInstrumentation.java
Outdated
Show resolved
Hide resolved
...rc/main/java/datadog/trace/instrumentation/vertx_4_0/server/RouteHandlerInstrumentation.java
Outdated
Show resolved
Hide resolved
...0/src/main/java/datadog/trace/instrumentation/vertx_4_0/server/RouteImplInstrumentation.java
Outdated
Show resolved
Hide resolved
...n/java/datadog/trace/instrumentation/vertx_4_0/server/RoutingContextImplInstrumentation.java
Outdated
Show resolved
Hide resolved
...-agent/instrumentation/vertx-web-4.0/src/test/groovy/server/VertxHttpServerForkedTest.groovy
Outdated
Show resolved
Hide resolved
dd-java-agent/instrumentation/vertx-web-4.0/vertx-web-4.0.gradle
Outdated
Show resolved
Hide resolved
devinsba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably fix the tests
...-agent/instrumentation/vertx-web-4.0/src/test/groovy/server/VertxHttpServerForkedTest.groovy
Show resolved
Hide resolved
|
You can see the failing tests here: https://app.circleci.com/pipelines/github/DataDog/dd-trace-java/13590/workflows/64d950e9-c130-4d62-83b3-cecc8415eb39/jobs/298083/tests Don't worry about the "instrumentation gateway" ones for now. The others like like they might just be a slight difference in how things were implemented @ValentinZakharov can you see if there's an obvious reason that the instrumentation gateway tests failed? |
from server.VertxSubrouterForkedTest |
|
Hello devinsba, I have committed change for correct path concatenation (deduplication of "//" to "/"). It fixed a nice number of tests. Fe. z_test_8_inst went from 32 failed tests to 4 failed tests (3 mentioning Gateway directly). Any idea how to fix Gateway related tests? |
...n/java/datadog/trace/instrumentation/vertx_4_0/server/RoutingContextImplInstrumentation.java
Show resolved
Hide resolved
| ext { | ||
| minJavaVersionForTests = JavaVersion.VERSION_1_8 | ||
| // TODO Java 17: This version of vertx-web doesn't support Java 17 | ||
| maxJavaVersionForTests = JavaVersion.VERSION_15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true, or does this version work on Java 17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems Java 17 is supported by Vertx web 4.2 and above
...src/main/java8/datadog/trace/instrumentation/vertx_4_0/server/RouteHandlerWrapperAdvice.java
Outdated
Show resolved
Hide resolved
|
@bantonsson @devinsba Do you have any suggestions for failing the |
|
You can ignore the system-tests but we do need to fix muzzle. What the failure seems to be telling us is that one of the instrumentation classes works for more versions than the range We usually fix this by adding a method to the advice class that depends on something that was added in the lowest version, see: https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/instrumentation/jetty-9/src/main/java/datadog/trace/instrumentation/jetty9/JettyServerInstrumentation.java#L147 |
Thanks for the suggestion @devinsba. I have already bound instrumentation on the class which was added in Vert.x 4 (similar as Vertx 3 instrumentation is doing it) in VertxVersionMatcher. The class should be in Vertx 4, but not in the Vertx 3. I will take another look, at if I ported changes correctly and what possibly could go wrong (maybe the class exist on other path in Vert.x 3.x) |
|
I have a fix for muzzle if you can allow me push access to the branch: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests |
...eb-4.0/src/main/java/datadog/trace/instrumentation/vertx_4_0/server/VertxVersionMatcher.java
Show resolved
Hide resolved
...0/src/main/java/datadog/trace/instrumentation/vertx_4_0/server/RouteImplInstrumentation.java
Show resolved
Hide resolved
...n/java/datadog/trace/instrumentation/vertx_4_0/server/RoutingContextImplInstrumentation.java
Show resolved
Hide resolved
It's seems it's on by default. |
|
Ah, thanks. My git config was wrong |
…rver/VertxHttpServerForkedTest.groovy Co-authored-by: Brian Devins-Suresh <badevins@gmail.com>
…nsaformations reflect Vertx method signature changes
…nsaformations reflect Vertx method signature changes (+ code reformating)
1f87744 to
662b63f
Compare
devinsba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!

What Does This Do
Motivation
Additional Notes / open questions
HttpServerResponseEndHandlerInstrumentationclass when the change in underlying Vert.x classes is reflected