Split vertx instrumentation into client and server instrumentation
ADD
instrumentation/vertx-http-client-3.0/javaagent/build.gradle.kts
+plugins {
+ id("otel.javaagent-instrumentation")
+}
+
+muzzle {
+ pass {
+ group.set("io.vertx")
+ module.set("vertx-core")
+ versions.set("[3.0.0,4.0.0)")
+ assertInverse.set(true)
+ }
+}
+
+dependencies {
+ library("io.vertx:vertx-core:3.0.0")
+
+ //We need both version as different versions of Vert.x use different versions of Netty
+ testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
+ testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
+ testInstrumentation(project(":instrumentation:jdbc:javaagent"))
+
+ // Vert.x 4.0 is incompatible with our tests.
+ // 3.9.7 Requires Netty 4.1.60, no other version works with it.
+ latestDepTestLibrary(enforcedPlatform("io.netty:netty-bom:4.1.60.Final"))
+ latestDepTestLibrary("io.vertx:vertx-core:3.+")
+}
+
+tasks {
+ named<Test>("test") {
+ systemProperty("testLatestDeps", findProperty("testLatestDeps"))
+ }
+}

RENAME
instrumentation/vertx-web-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/Contexts.java
instrumentation/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/Contexts.java
RENAME
instrumentation/vertx-web-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/ExceptionHandlerWrapper.java
instrumentation/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/ExceptionHandlerWrapper.java
RENAME
instrumentation/vertx-web-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/HttpRequestInstrumentation.java
instrumentation/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/HttpRequestInstrumentation.java
RENAME
instrumentation/vertx-web-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/VertxClientInstrumentationModule.java
instrumentation/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/VertxClientInstrumentationModule.java
RENAME
instrumentation/vertx-web-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/VertxClientTracer.java
instrumentation/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/client/VertxClientTracer.java
RENAME
instrumentation/vertx-web-3.0/javaagent/src/test/groovy/client/VertxHttpClientTest.groovy
instrumentation/vertx-http-client-3.0/javaagent/src/test/groovy/client/VertxHttpClientTest.groovy
RENAME
instrumentation/vertx-web-3.0/javaagent/src/test/groovy/client/VertxSingleConnection.java
instrumentation/vertx-http-client-3.0/javaagent/src/test/groovy/client/VertxSingleConnection.java
package client;
-import static io.opentelemetry.instrumentation.test.base.SingleConnection.REQUEST_ID_HEADER;
-
import io.opentelemetry.instrumentation.test.base.SingleConnection;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;

MODIFY
instrumentation/vertx-reactive-3.5/javaagent/build.gradle.kts
instrumentation/vertx-reactive-3.5/javaagent/build.gradle.kts
@@ -19,6 +19,7 @@ dependencies {
testInstrumentation(project(":instrumentation:jdbc:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
+ testInstrumentation(project(":instrumentation:vertx-http-client-3.0:javaagent"))
testInstrumentation(project(":instrumentation:vertx-web-3.0:javaagent"))
//TODO we should include rjxava2 instrumentation here as well

MODIFY
instrumentation/vertx-web-3.0/javaagent/build.gradle.kts
instrumentation/vertx-web-3.0/javaagent/build.gradle.kts
@@ -7,8 +7,6 @@ muzzle {
group.set("io.vertx")
module.set("vertx-web")
versions.set("[3.0.0,4.0.0)")
- //TODO we should split this module into client and server
- //They have different version applicability
// assertInverse.set(true)
}
}
@@ -29,11 +27,4 @@ dependencies {
// 3.9.7 Requires Netty 4.1.60, no other version works with it.
latestDepTestLibrary(enforcedPlatform("io.netty:netty-bom:4.1.60.Final"))
latestDepTestLibrary("io.vertx:vertx-web:3.+")
- latestDepTestLibrary("io.vertx:vertx-web-client:3.+")
-}
-
-tasks {
- named<Test>("test") {
- systemProperty("testLatestDeps", findProperty("testLatestDeps"))
- }
}

MODIFY
settings.gradle.kts
settings.gradle.kts
@@ -315,8 +315,9 @@ include(":instrumentation:undertow-1.4:bootstrap")
include(":instrumentation:undertow-1.4:javaagent")
include(":instrumentation:vaadin-14.2:javaagent")
include(":instrumentation:vaadin-14.2:testing")
-include(":instrumentation:vertx-web-3.0:javaagent")
+include(":instrumentation:vertx-http-client-3.0:javaagent")
include(":instrumentation:vertx-reactive-3.5:javaagent")
+include(":instrumentation:vertx-web-3.0:javaagent")
include(":instrumentation:wicket-8.0:javaagent")
// benchmark

Split vertx instrumentation into client and server instrumentation (#3567)