Rename jaxrs-client resteasy module
MODIFY
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-common/javaagent/jaxrs-client-2.0-common-javaagent.gradle
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-common/javaagent/jaxrs-client-2.0-common-javaagent.gradle
@@ -21,7 +21,7 @@ dependencies {
testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-cxf-3.0:javaagent')
testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-jersey-2.0:javaagent')
- testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-resteasy-2.0:javaagent')
+ testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-resteasy-3.0:javaagent')
testImplementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'

MODIFY
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-jersey-2.0/javaagent/jaxrs-client-2.0-jersey-2.0-javaagent.gradle
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-jersey-2.0/javaagent/jaxrs-client-2.0-jersey-2.0-javaagent.gradle
@@ -9,7 +9,7 @@ muzzle {
}
dependencies {
- compileOnly group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.0'
+ library group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.0'
implementation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-common:javaagent')
}

DELETE
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-2.0/javaagent/jaxrs-client-2.0-resteasy-2.0-javaagent.gradle
-apply from: "$rootDir/gradle/instrumentation.gradle"
-
-muzzle {
- pass {
- group = "org.jboss.resteasy"
- module = "resteasy-client"
- versions = "[2.0,)"
- }
-}
-
-dependencies {
- library group: 'org.jboss.resteasy', name: 'resteasy-client', version: '3.0.10.Final'
-
- implementation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-common:javaagent')
-}

ADD
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-3.0/javaagent/jaxrs-client-2.0-resteasy-3.0-javaagent.gradle
+apply from: "$rootDir/gradle/instrumentation.gradle"
+
+muzzle {
+ pass {
+ group = "org.jboss.resteasy"
+ module = "resteasy-client"
+ versions = "[3.0.0.Final,)"
+ }
+}
+
+dependencies {
+ // compiling against a version prior to 3.0.10.Final will bind the call in ResteasyInjectAdapter:
+ // carrier.getHeaders().getHeaders().putSingle(key, value)
+ // to:
+ // org.jboss.resteasy.util.CaseInsensitiveMap#putSingle(Ljava/lang/String;Ljava/lang/Object;)V
+ // which will be incompatible with 3.0.10.Final and later, where that API was changed to:
+ // org.jboss.resteasy.util.CaseInsensitiveMap#putSingle(Ljava/lang/Object;Ljava/lang/Object;)V
+ //
+ // conversely, however:
+ // compiling against 3.0.10.Final will bind the call in ResteasyInjectAdapter:
+ // carrier.getHeaders().getHeaders().putSingle(key, value)
+ // to:
+ // org.jboss.resteasy.util.CaseInsensitiveMap#putSingle(Ljava/lang/Object;Ljava/lang/Object;)V
+ // which WILL be compatible with versions prior to 3.0.10.Final, because in those versions
+ // putSingle(String, Object) is a generic implementation for
+ // javax.ws.rs.core.MultivaluedMap.putSingle(K, V), and so there's also a synthetic bridge method
+ // putSingle(Object, Object) in those versions
+ library group: 'org.jboss.resteasy', name: 'resteasy-client', version: '3.0.10.Final'
+
+ implementation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-common:javaagent')
+}

RENAME
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyClientInstrumentationModule.java
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyClientInstrumentationModule.java
RENAME
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyClientTracer.java
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyClientTracer.java
@@ -67,6 +67,6 @@ public class ResteasyClientTracer
@Override
protected String getInstrumentationName() {
- return "io.opentelemetry.javaagent.jaxrs-client-2.0-resteasy-2.0";
+ return "io.opentelemetry.javaagent.jaxrs-client-2.0-resteasy-3.0";
}
}

RENAME
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyInjectAdapter.java
instrumentation/jaxrs-client/jaxrs-client-2.0/jaxrs-client-2.0-resteasy-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyInjectAdapter.java
MODIFY
settings.gradle
settings.gradle
@@ -141,7 +141,7 @@ include ':instrumentation:jaxrs-client:jaxrs-client-1.1:javaagent'
include ':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-common:javaagent'
include ':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-cxf-3.0:javaagent'
include ':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-jersey-2.0:javaagent'
-include ':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-resteasy-2.0:javaagent'
+include ':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-resteasy-3.0:javaagent'
include ':instrumentation:jaxws:jaxws-2.0:javaagent'
include ':instrumentation:jaxws:jaxws-2.0-axis2-1.6:javaagent'
include ':instrumentation:jaxws:jaxws-2.0-axis2-1.6:library'

Rename jaxrs-client resteasy module (#2827)