diff --git a/dd-java-agent/instrumentation/grizzly-client-1.9/src/main/java/datadog/trace/instrumentation/grizzly/client/AsyncHttpClientInstrumentation.java b/dd-java-agent/instrumentation/grizzly-client-1.9/src/main/java/datadog/trace/instrumentation/grizzly/client/AsyncHttpClientInstrumentation.java index f514b230d52..0a4eb8c1cdc 100644 --- a/dd-java-agent/instrumentation/grizzly-client-1.9/src/main/java/datadog/trace/instrumentation/grizzly/client/AsyncHttpClientInstrumentation.java +++ b/dd-java-agent/instrumentation/grizzly-client-1.9/src/main/java/datadog/trace/instrumentation/grizzly/client/AsyncHttpClientInstrumentation.java @@ -15,8 +15,10 @@ import com.ning.http.client.Request; import datadog.trace.agent.tooling.Instrumenter; import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.api.InstrumenterConfig; import datadog.trace.bootstrap.instrumentation.api.AgentSpan; import datadog.trace.bootstrap.instrumentation.decorator.HttpClientDecorator; +import java.util.Collections; import net.bytebuddy.asm.Advice; @AutoService(InstrumenterModule.class) @@ -29,7 +31,7 @@ public AsyncHttpClientInstrumentation() { @Override protected boolean defaultEnabled() { - return false; + return InstrumenterConfig.get().isIntegrationEnabled(Collections.singleton("mule"), false); } @Override diff --git a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/DefaultFilterChainInstrumentation.java b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/DefaultFilterChainInstrumentation.java index 091dbd8322e..37c5d2123fb 100644 --- a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/DefaultFilterChainInstrumentation.java +++ b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/DefaultFilterChainInstrumentation.java @@ -8,6 +8,8 @@ import com.google.auto.service.AutoService; import datadog.trace.agent.tooling.Instrumenter; import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.api.InstrumenterConfig; +import java.util.Collections; @AutoService(InstrumenterModule.class) public class DefaultFilterChainInstrumentation extends InstrumenterModule.Tracing @@ -37,7 +39,7 @@ public String[] helperClassNames() { @Override protected boolean defaultEnabled() { - return false; + return InstrumenterConfig.get().isIntegrationEnabled(Collections.singleton("mule"), false); } @Override diff --git a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpCodecFilterInstrumentation.java b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpCodecFilterInstrumentation.java index 53821ca2d9d..bde405ddbe3 100644 --- a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpCodecFilterInstrumentation.java +++ b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpCodecFilterInstrumentation.java @@ -7,6 +7,8 @@ import com.google.auto.service.AutoService; import datadog.trace.agent.tooling.Instrumenter; import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.api.InstrumenterConfig; +import java.util.Collections; @AutoService(InstrumenterModule.class) public final class HttpCodecFilterInstrumentation extends InstrumenterModule.Tracing @@ -23,7 +25,7 @@ public String instrumentedType() { @Override protected boolean defaultEnabled() { - return false; + return InstrumenterConfig.get().isIntegrationEnabled(Collections.singleton("mule"), false); } @Override diff --git a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpServerFilterInstrumentation.java b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpServerFilterInstrumentation.java index 7c92014d73f..583fb166846 100644 --- a/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpServerFilterInstrumentation.java +++ b/dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/HttpServerFilterInstrumentation.java @@ -7,6 +7,8 @@ import com.google.auto.service.AutoService; import datadog.trace.agent.tooling.Instrumenter; import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.api.InstrumenterConfig; +import java.util.Collections; @AutoService(InstrumenterModule.class) public class HttpServerFilterInstrumentation extends InstrumenterModule.Tracing @@ -23,7 +25,7 @@ public String instrumentedType() { @Override protected boolean defaultEnabled() { - return false; + return InstrumenterConfig.get().isIntegrationEnabled(Collections.singleton("mule"), false); } @Override diff --git a/dd-java-agent/instrumentation/mule-4/application/pom.xml b/dd-java-agent/instrumentation/mule-4/application/pom.xml index f684ba37979..39f32ab235d 100644 --- a/dd-java-agent/instrumentation/mule-4/application/pom.xml +++ b/dd-java-agent/instrumentation/mule-4/application/pom.xml @@ -6,8 +6,8 @@ UTF-8 UTF-8 - 4.2.2-20210129 - 3.4.2 + 4.5.0 + 3.8.6 ${project.basedir} mule-test-application 1.0.0-SNAPSHOT @@ -57,19 +57,19 @@ org.mule.connectors mule-http-connector - 1.5.23 + 1.9.2 mule-plugin org.mule.connectors mule-sockets-connector - 1.2.0 + 1.2.4 mule-plugin org.mule.module mule-java-module - 1.2.7 + 1.2.13 mule-plugin diff --git a/dd-java-agent/instrumentation/mule-4/build.gradle b/dd-java-agent/instrumentation/mule-4/build.gradle index e11ec54f47e..70ea3c665d3 100644 --- a/dd-java-agent/instrumentation/mule-4/build.gradle +++ b/dd-java-agent/instrumentation/mule-4/build.gradle @@ -1,68 +1,94 @@ ext { - // TODO Java 17: Mule 4 doesn't support Java 17 - maxJavaVersionForTests = JavaVersion.VERSION_15 + forkedTestMaxJavaVersionForTests = JavaVersion.VERSION_11 + mule46ForkedTestMaxJavaVersionForTests = JavaVersion.VERSION_11 + latestDepForkedTestMinJavaVersionForTests = JavaVersion.VERSION_17 + latestDepForkedTestMaxJavaVersionForTests = JavaVersion.VERSION_17 } +def muleVersion = '4.5.0' +def appDir = "$projectDir/application" muzzle { - extraRepository('anypoint-releases', 'https://maven.anypoint.mulesoft.com/api/v2/maven') extraRepository('mulesoft-releases', 'https://repository.mulesoft.org/releases') extraRepository('mulesoft-public', 'https://repository.mulesoft.org/nexus/content/repositories/public') pass { group = 'org.mule.runtime' module = 'mule-core' - versions = '[,]' - assertInverse = true - - excludeDependency 'com.google.code.findbugs:jsr305' // avoid dependency issue with mule-4.5.0 + versions = "[$muleVersion,)" + javaVersion = "17" + excludeDependency 'om.google.guava:guava' + excludeDependency 'com.google.code.findbugs:jsr305' + additionalDependencies +="org.mule.runtime:mule-tracer-customization-impl:$muleVersion" } - - fail { - group = 'org.mule' + pass { + group = 'org.mule.runtime' + module = 'mule-tracer-customization-impl' + versions = "[$muleVersion,)" + javaVersion = "17" + excludeDependency 'om.google.guava:guava' + excludeDependency 'com.google.code.findbugs:jsr305' + additionalDependencies +="org.mule.runtime:mule-core:$muleVersion" + } + pass { + name = 'before-4.5.0' + group = 'org.mule.runtime' module = 'mule-core' - versions = '[3.2.0,)' // First version where muzzle can resolve all dependencies - skipVersions += "3.9.5" // bad release + versions = "[$muleVersion,)" + javaVersion = "17" + assertInverse true + excludeDependency 'om.google.guava:guava' + excludeDependency 'com.google.code.findbugs:jsr305' + additionalDependencies +="org.mule.runtime:mule-tracer-customization-impl:$muleVersion" } } apply from: "$rootDir/gradle/java.gradle" -def muleVersion = '4.2.2' -def muleBaseDir = "$buildDir/mule" -def appDir = "$projectDir/application" -def generatedResourcesDir = "$buildDir/generated-resources/test" - -clean.doFirst { - delete muleBaseDir -} +addTestSuiteForDir('mule46ForkedTest', 'test') +addTestSuiteForDir('latestDepForkedTest', 'test') repositories { - maven { - name "anypoint-releases" - url "https://maven.anypoint.mulesoft.com/api/v2/maven" - } maven { name "mulesoft-releases" url "https://repository.mulesoft.org/releases" + mavenContent { + releasesOnly() + } } maven { name "mulesoft-public" url "https://repository.mulesoft.org/nexus/content/repositories/public" + mavenContent { + releasesOnly() + } } } configurations { muleServices + mule46Services + latestMuleServices } configurations.all { - // don't allow mule to do slf4j over log4j - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' + exclude group: 'pull-parser', module: 'pull-parser' + + resolutionStrategy { + // avoid bringing in logback based on java 11 + force libs.logback.classic + force libs.logback.core + } } sourceSets { test { - output.dir(generatedResourcesDir, builtBy: 'generateAppResources') + output.dir("$buildDir/generated-resources/test", builtBy: 'generateAppResources') + } + mule46ForkedTest { + output.dir("$buildDir/generated-resources/mule46ForkedTest", builtBy: 'generateAppResources46') + } + latestDepForkedTest { + output.dir("$buildDir/generated-resources/latestDepForkedTest", builtBy: 'generateAppResourcesLatest') } } @@ -70,42 +96,104 @@ tasks.named("compileTestGroovy").configure { dependsOn 'mvnPackage', 'extractMuleServices' } +tasks.named("compileMule46ForkedTestGroovy").configure { + dependsOn 'mvnPackage', 'extractMule46Services' +} + +tasks.named("compileLatestDepForkedTestGroovy").configure { + dependsOn 'mvnPackage', 'extractLatestMuleServices' + setJavaVersion(it, 17) +} + +tasks.named("compileLatestDepForkedTestJava").configure { + setJavaVersion(it, 17) +} + dependencies { compileOnly group: 'org.mule.runtime', name: 'mule-core', version: muleVersion - testImplementation project(':dd-java-agent:instrumentation:aws-common') + compileOnly group: 'org.mule.runtime', name: 'mule-tracer-customization-impl', version: muleVersion + testImplementation project(':dd-java-agent:instrumentation:aws-common') testImplementation project(':dd-java-agent:instrumentation:reactor-core-3.1') testImplementation project(':dd-java-agent:instrumentation:reactive-streams') + testImplementation project(':dd-java-agent:instrumentation:grizzly-2') testImplementation project(':dd-java-agent:instrumentation:grizzly-http-2.3.20') testImplementation project(':dd-java-agent:instrumentation:grizzly-client-1.9') testImplementation project(':dd-java-agent:instrumentation:caffeine') + testImplementation project(':dd-java-agent:instrumentation:quartz-2') + testImplementation group: 'org.mule.runtime', name: 'mule-module-launcher', version: muleVersion testImplementation group: 'org.mule.runtime', name: 'mule-core', version: muleVersion - testImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: muleVersion + //testImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: muleVersion testImplementation group: 'org.mule.runtime', name: 'mule-module-service', version: muleVersion // this is needed for mule to find removed javax.* APIs on Java 11+ testImplementation group: 'org.mule.runtime', name: 'mule-module-javaee', version: muleVersion - - muleServices group: 'org.mule.services', name: 'mule-service-http', version: '1.4.7', classifier: 'mule-service' - muleServices group: 'org.mule.services', name: 'mule-service-scheduler', version: '1.2.4', classifier: 'mule-service' - muleServices group: 'org.mule.services', name: 'mule-service-weave', version: '2.2.2', classifier: 'mule-service' + testImplementation group: 'org.mule.runtime', name: 'mule-dwb-api', version: '2.5.0' + // testImplementation group: 'xml-apis', name: 'xml-apis', version: '1.4.01' + muleServices group: 'org.mule.services', name: 'mule-service-http', version: '1.5.21', classifier: 'mule-service' + muleServices group: 'org.mule.services', name: 'mule-service-scheduler', version: '1.5.0', classifier: 'mule-service' + muleServices group: 'org.mule.services', name: 'mule-service-weave', version: '2.5.0', classifier: 'mule-service' + + mule46ForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-launcher', version: '4.6.0' + mule46ForkedTestImplementation group: 'org.mule.runtime', name: 'mule-core', version: '4.6.0' + mule46ForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: '4.6.0' + mule46ForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-service', version: '4.6.0' + // this is needed for mule to find removed javax.* APIs on Java 11+ + mule46ForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-javaee', version: '4.6.0' + mule46Services group: 'org.mule.services', name: 'mule-service-http', version: '1.5.21', classifier: 'mule-service' + mule46Services group: 'org.mule.services', name: 'mule-service-scheduler', version: '1.5.0', classifier: 'mule-service' + mule46Services group: 'org.mule.services', name: 'mule-service-weave', version: '2.5.0', classifier: 'mule-service' + + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-launcher', version: '4.8.+' + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-core', version: '4.8.+' + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-extensions-spring-support', version: '4.8.+' + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-service', version: '4.8.+' + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-module-javaee', version: '4.8.+' + + + //TODO: 4.9.0 is not yet out but it looks like using 4.+ instead of above 4.8.+ brings in 4.9.0-SNAPSHOT artifacts. + /* + When testing with them, the mule container does not bootstrap because of: + None of [protected void java.lang.Object.finalize() throws java.lang.Throwable, public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException, public final void java.lang.Object.wait() throws java.lang.InterruptedException, public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException, public boolean java.lang.Object.equals(java.lang.Object), public java.lang.String java.lang.Object.toString(), public native int java.lang.Object.hashCode(), public final native java.lang.Class java.lang.Object.getClass(), protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException, public final native void java.lang.Object.notify(), public final native void java.lang.Object.notifyAll(), public abstract java.lang.Object java.lang.reflect.InvocationHandler.invoke(java.lang.Object,java.lang.reflect.Method,java.lang.Object[]) throws java.lang.Throwable] allows for delegation from public boolean org.springframework.beans.factory.SmartFactoryBean.isEagerInit() + */ + latestDepForkedTestImplementation group: 'org.mule.runtime', name: 'mule-extensions-soap-api', version: '1.8.+' + + latestDepForkedTestImplementation group: 'jakarta.xml.ws', name: 'jakarta.xml.ws-api', version: '4.0.2' + // back to the future + latestDepForkedTestImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0' + latestDepForkedTestImplementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0' + latestDepForkedTestImplementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0' + + latestMuleServices group: 'org.mule.services', name: 'mule-service-http', version: '1.+', classifier: 'mule-service' + latestMuleServices group: 'org.mule.services', name: 'mule-service-scheduler', version: '1.+', classifier: 'mule-service' + latestMuleServices group: 'org.mule.services', name: 'mule-service-weave', version: '2.8.1', classifier: 'mule-service' } -// extract the enabled services into the mule base directory -tasks.register('extractMuleServices', Sync) { - dependsOn configurations.muleServices - - configurations.muleServices.resolvedConfiguration.resolvedArtifacts.findAll { +def copyMuleArtifacts(String configName, String muleBaseDir, Sync sync) { + configurations[configName].resolvedConfiguration.resolvedArtifacts.findAll { it.classifier == "mule-service" } collect { artifact -> def id = artifact.moduleVersion.id - from(zipTree(artifact.file)) { + sync.from(zipTree(artifact.file)) { into("${id.name}-${id.version}") } } + sync.into "$muleBaseDir/services" +} - into "$muleBaseDir/services" +// extract the enabled services into the mule base directory +tasks.register('extractMuleServices', Sync) { + dependsOn configurations.muleServices + copyMuleArtifacts("muleServices", "$buildDir/mule/test", it) +} +tasks.register('extractMule46Services', Sync) { + dependsOn configurations.mule46Services + copyMuleArtifacts("mule46Services", "$buildDir/mule/mule46ForkedTest", it) +} +tasks.register('extractLatestMuleServices', Sync) { + dependsOn configurations.latestMuleServices + copyMuleArtifacts("latestMuleServices", "$buildDir/mule/latestDepForkedTest", it) } // build the mule application via maven @@ -118,23 +206,29 @@ tasks.register('mvnPackage', Exec) { inputs.file("$appDir/mule-artifact.json") } + // generate a properties file so the test knows where to run mule, and what jar to deploy tasks.register('generateAppResources') { - outputs.dir generatedResourcesDir - doLast { + createAppResourceTask(it, "test") +} +tasks.register('generateAppResources46') { + createAppResourceTask(it, "mule46ForkedTest") +} +tasks.register('generateAppResourcesLatest') { + createAppResourceTask(it, "latestDepForkedTest") +} + +def createAppResourceTask(Task task, String name) { + def generatedResourcesDir = "$buildDir/generated-resources/$name" + task.outputs.dir generatedResourcesDir + task.doLast { def generated = new File(generatedResourcesDir, "test-build.properties") - generated.text = """|mule.base=$muleBaseDir + generated.text = """|mule.base=$buildDir/mule/$name |MuleTestApplicationConstants.jar=$buildDir/target/mule-test-application-$version-mule-application.jar |MuleTestApplicationConstants.name=mule-test-application-$version-mule-application""".stripMargin() } } -tasks.named("test").configure { - outputs.upToDateWhen { - !mvnPackage.didWork && !extractMuleServices.didWork - } -} - spotless { java { target "**/*.java" diff --git a/dd-java-agent/instrumentation/mule-4/gradle.lockfile b/dd-java-agent/instrumentation/mule-4/gradle.lockfile index 8c7b7436cc6..da2508ae972 100644 --- a/dd-java-agent/instrumentation/mule-4/gradle.lockfile +++ b/dd-java-agent/instrumentation/mule-4/gradle.lockfile @@ -3,34 +3,39 @@ # This file is expected to be part of source control. cafe.cryptography:curve25519-elisabeth:0.1.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath cafe.cryptography:ed25519-elisabeth:0.1.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -cglib:cglib-nodep:3.2.10=compileClasspath,testCompileClasspath,testRuntimeClasspath ch.qos.logback:logback-classic:1.2.3=testCompileClasspath,testRuntimeClasspath ch.qos.logback:logback-core:1.2.3=testCompileClasspath,testRuntimeClasspath -com.beust:jcommander:1.78=testRuntimeClasspath +com.beust:jcommander:1.78=testCompileClasspath,testRuntimeClasspath com.blogspot.mydailyjava:weak-lock-free:0.17=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.chuusai:shapeless_2.12:2.3.3=muleServices +com.conversantmedia:disruptor:1.2.10=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.damnhandy:handy-uri-templates:2.1.8=muleServices com.datadoghq.okhttp3:okhttp:3.12.15=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.datadoghq.okio:okio:1.17.6=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,instrumentPluginClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.datadoghq:java-dogstatsd-client:4.4.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath com.datadoghq:sketches-java:0.8.3=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.fasterxml.jackson.core:jackson-annotations:2.9.0=testCompileClasspath,testRuntimeClasspath -com.fasterxml.jackson.core:jackson-annotations:2.9.10=muleServices -com.fasterxml.jackson.core:jackson-core:2.9.10=muleServices -com.fasterxml.jackson.core:jackson-core:2.9.9=testCompileClasspath,testRuntimeClasspath -com.fasterxml.jackson.core:jackson-databind:2.9.10=muleServices -com.fasterxml.jackson.core:jackson-databind:2.9.9=testCompileClasspath,testRuntimeClasspath -com.fasterxml.jackson.module:jackson-module-jsonSchema:2.9.9=testCompileClasspath,testRuntimeClasspath -com.fasterxml.woodstox:woodstox-core:5.0.2=muleServices -com.fasterxml:aalto-xml:1.0.0=muleServices -com.github.ben-manes.caffeine:caffeine:2.6.2=muleServices +com.fasterxml.jackson.core:jackson-annotations:2.10.0=compileClasspath +com.fasterxml.jackson.core:jackson-annotations:2.12.7=muleServices +com.fasterxml.jackson.core:jackson-annotations:2.15.0=testCompileClasspath,testRuntimeClasspath +com.fasterxml.jackson.core:jackson-core:2.10.0=compileClasspath +com.fasterxml.jackson.core:jackson-core:2.15.0=muleServices,testCompileClasspath,testRuntimeClasspath +com.fasterxml.jackson.core:jackson-databind:2.10.0=compileClasspath +com.fasterxml.jackson.core:jackson-databind:2.12.7=muleServices +com.fasterxml.jackson.core:jackson-databind:2.15.0=testCompileClasspath,testRuntimeClasspath +com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.0=testCompileClasspath,testRuntimeClasspath +com.fasterxml.jackson.module:jackson-module-jsonSchema:2.10.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.fasterxml.woodstox:woodstox-core:6.4.0=muleServices +com.fasterxml:aalto-xml:1.3.2=muleServices com.github.ben-manes.caffeine:caffeine:2.8.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -com.github.fge:btf:1.2=testCompileClasspath,testRuntimeClasspath -com.github.fge:msg-simple:1.1=testCompileClasspath,testRuntimeClasspath -com.github.fge:uri-template:0.9=testCompileClasspath,testRuntimeClasspath -com.github.java-json-tools:jackson-coreutils:1.9=testCompileClasspath,testRuntimeClasspath -com.github.java-json-tools:json-schema-core:1.2.10=testCompileClasspath,testRuntimeClasspath -com.github.java-json-tools:json-schema-validator:2.2.10=testCompileClasspath,testRuntimeClasspath +com.github.ben-manes.caffeine:caffeine:2.9.0=muleServices +com.github.erosb:everit-json-schema:1.14.2=muleServices +com.github.fge:btf:1.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.github.fge:msg-simple:1.1=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.github.fge:uri-template:0.9=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.github.java-json-tools:jackson-coreutils:1.9=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.github.java-json-tools:json-schema-core:1.2.10=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.github.java-json-tools:json-schema-validator:2.2.10=compileClasspath,testCompileClasspath,testRuntimeClasspath com.github.javaparser:javaparser-core:3.25.1=testCompileClasspath,testRuntimeClasspath com.github.jnr:jffi:1.3.13=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath com.github.jnr:jnr-a64asm:1.0.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath @@ -40,84 +45,105 @@ com.github.jnr:jnr-ffi:2.2.16=instrumentPluginClasspath,muzzleTooling,runtimeCla com.github.jnr:jnr-posix:3.1.19=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath com.github.jnr:jnr-unixsocket:0.38.22=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath com.github.jnr:jnr-x86asm:1.0.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.spotbugs:spotbugs-annotations:4.2.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -com.github.spotbugs:spotbugs-annotations:4.7.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.7.3=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs:4.7.3=spotbugs com.github.stefanbirkner:system-rules:1.19.0=testCompileClasspath,testRuntimeClasspath com.google.auto.service:auto-service-annotations:1.0-rc7=annotationProcessor,compileClasspath,testAnnotationProcessor,testCompileClasspath com.google.auto.service:auto-service:1.0-rc7=annotationProcessor,testAnnotationProcessor com.google.auto:auto-common:0.10=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:annotations:3.0.0=testCompileClasspath,testRuntimeClasspath -com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,muleServices,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.8.5=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath +com.google.code.gson:gson:2.8.9=compileClasspath +com.google.code.gson:gson:2.9.0=testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.9.1=spotbugs -com.google.errorprone:error_prone_annotations:2.1.3=muleServices +com.google.errorprone:error_prone_annotations:2.18.0=compileClasspath,testCompileClasspath,testRuntimeClasspath com.google.errorprone:error_prone_annotations:2.2.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.3.3=compileClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0=testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:25.1-jre=compileClasspath,muleServices -com.google.guava:guava:27.0-jre=testCompileClasspath,testRuntimeClasspath +com.google.errorprone:error_prone_annotations:2.5.1=muleServices +com.google.guava:failureaccess:1.0.1=annotationProcessor,compileClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.guava:guava:27.0.1-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:1.1=annotationProcessor,compileClasspath,muleServices,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath +com.google.guava:guava:32.1.1-jre=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath +com.google.j2objc:j2objc-annotations:1.1=annotationProcessor,testAnnotationProcessor +com.google.j2objc:j2objc-annotations:2.8=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.google.re2j:re2j:1.6=muleServices com.google.re2j:re2j:1.7=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.googlecode.juniversalchardet:juniversalchardet:1.0.3=testCompileClasspath,testRuntimeClasspath -com.googlecode.libphonenumber:libphonenumber:8.0.0=testCompileClasspath,testRuntimeClasspath -com.lmax:disruptor:3.3.7=testCompileClasspath,testRuntimeClasspath -com.mchange:c3p0:0.9.5.4=muleServices -com.mchange:mchange-commons-java:0.2.15=muleServices +com.googlecode.juniversalchardet:juniversalchardet:1.0.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.googlecode.libphonenumber:libphonenumber:8.0.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.ibm.icu:icu4j:67.1=muleServices +com.lmax:disruptor:3.4.3=testCompileClasspath,testRuntimeClasspath +com.mchange:c3p0:0.9.5.5=muleServices +com.mchange:mchange-commons-java:0.2.19=muleServices com.squareup.moshi:moshi:1.11.0=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.squareup.okhttp3:logging-interceptor:3.12.12=testCompileClasspath,testRuntimeClasspath -com.squareup.okhttp3:okhttp:3.12.12=testCompileClasspath,testRuntimeClasspath -com.squareup.okio:okio:1.17.5=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.sun.activation:jakarta.activation:1.2.1=muleServices,testCompileClasspath,testRuntimeClasspath -com.sun.activation:javax.activation:1.2.0=compileClasspath,muleServices,testCompileClasspath,testRuntimeClasspath -com.sun.istack:istack-commons-runtime:3.0.7=compileClasspath,testCompileClasspath,testRuntimeClasspath -com.sun.mail:jakarta.mail:1.6.3=testCompileClasspath,testRuntimeClasspath -com.sun.mail:jakarta.mail:1.6.4=muleServices +com.squareup.okhttp3:okhttp:3.12.12=testCompileClasspath +com.squareup.okhttp3:okhttp:4.11.0=testRuntimeClasspath +com.squareup.okio:okio-jvm:3.2.0=testRuntimeClasspath +com.squareup.okio:okio:1.17.5=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath +com.squareup.okio:okio:3.2.0=testRuntimeClasspath +com.sun.activation:jakarta.activation:1.2.1=muleServices +com.sun.activation:jakarta.activation:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.sun.activation:javax.activation:1.2.0=muleServices +com.sun.mail:jakarta.mail:1.6.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.sun.mail:jakarta.mail:1.6.7=muleServices com.sun.mail:mailapi:1.6.4=muleServices -com.sun.xml.bind:jaxb-core:2.3.0.1=testCompileClasspath,testRuntimeClasspath -com.sun.xml.bind:jaxb-impl:2.3.1-MULE-001=testCompileClasspath,testRuntimeClasspath -com.sun.xml.fastinfoset:FastInfoset:1.2.15=compileClasspath,testCompileClasspath,testRuntimeClasspath +com.sun.xml.bind:jaxb-impl:2.3.8=compileClasspath,testCompileClasspath,testRuntimeClasspath com.thoughtworks.qdox:qdox:1.12.1=testRuntimeClasspath com.typesafe:config:1.3.1=testCompileClasspath,testRuntimeClasspath -com.vdurmont:semver4j:2.0.3=testCompileClasspath,testRuntimeClasspath +com.vdurmont:semver4j:3.1.0=compileClasspath,testCompileClasspath,testRuntimeClasspath com.zaxxer:HikariCP-java7:2.4.13=muleServices commons-beanutils:commons-beanutils:1.9.4=compileClasspath,testCompileClasspath,testRuntimeClasspath -commons-cli:commons-cli:1.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -commons-codec:commons-codec:1.10=testRuntimeClasspath +commons-cli:commons-cli:1.2=testCompileClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.11=testCompileClasspath commons-codec:commons-codec:1.15=spotbugs -commons-codec:commons-codec:1.9=testCompileClasspath -commons-collections:commons-collections:3.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.16.0=testRuntimeClasspath +commons-collections:commons-collections:3.2.2=muleServices +commons-digester:commons-digester:2.1=muleServices commons-fileupload:commons-fileupload:1.5=testCompileClasspath,testRuntimeClasspath -commons-io:commons-io:2.11.0=testCompileClasspath,testRuntimeClasspath -commons-io:commons-io:2.6=compileClasspath,muleServices -commons-lang:commons-lang:2.6=testCompileClasspath,testRuntimeClasspath -commons-logging:commons-logging:1.2=testCompileClasspath,testRuntimeClasspath -commons-pool:commons-pool:1.6=compileClasspath,testCompileClasspath,testRuntimeClasspath +commons-io:commons-io:2.11.0=muleServices +commons-io:commons-io:2.13.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +commons-lang:commons-lang:2.6=compileClasspath,testCompileClasspath,testRuntimeClasspath +commons-logging:commons-logging:1.2=muleServices +commons-validator:commons-validator:1.7=muleServices de.thetaphi:forbiddenapis:3.1=compileClasspath info.picocli:picocli:4.6.3=testRuntimeClasspath -io.projectreactor.addons:reactor-extra:3.1.6.RELEASE=compileClasspath,testCompileClasspath,testRuntimeClasspath -io.projectreactor:reactor-core:3.2.12.RELEASE=compileClasspath,testCompileClasspath,testRuntimeClasspath -io.sqreen:libsqreen:11.2.0=testRuntimeClasspath -it.unimi.dsi:fastutil:8.1.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.activation:javax.activation-api:1.2.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.annotation:javax.annotation-api:1.3.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.helidon.grpc:io.grpc:2.6.1=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-api-events:1.27.0-alpha=testRuntimeClasspath +io.opentelemetry:opentelemetry-api:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-context:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-common:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-logging:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-otlp-common:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-otlp:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-extension-incubator:1.27.0-alpha=testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-common:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.27.0=testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-logs:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-metrics:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-testing:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk-trace:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-sdk:1.27.0=testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-semconv:1.27.0-alpha=testRuntimeClasspath +io.perfmark:perfmark-api:0.25.0=testCompileClasspath,testRuntimeClasspath +io.projectreactor.addons:reactor-extra:3.4.8=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.projectreactor:reactor-core:3.4.22=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.sqreen:libsqreen:11.1.0=testRuntimeClasspath +it.unimi.dsi:fastutil:8.5.11=testCompileClasspath,testRuntimeClasspath +jakarta.activation:jakarta.activation-api:1.2.2=testCompileClasspath,testRuntimeClasspath +jakarta.annotation:jakarta.annotation-api:1.3.5=compileClasspath,testCompileClasspath,testRuntimeClasspath +jakarta.jms:jakarta.jms-api:2.0.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +jakarta.jws:jakarta.jws-api:1.1.1=testCompileClasspath +jakarta.jws:jakarta.jws-api:2.1.0=testRuntimeClasspath +jakarta.resource:jakarta.resource-api:1.7.4=testCompileClasspath,testRuntimeClasspath +jakarta.transaction:jakarta.transaction-api:1.3.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +jakarta.xml.bind:jakarta.xml.bind-api:2.3.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +jakarta.xml.soap:jakarta.xml.soap-api:1.4.2=testCompileClasspath,testRuntimeClasspath +jakarta.xml.ws:jakarta.xml.ws-api:2.3.3=testCompileClasspath,testRuntimeClasspath javax.inject:javax.inject:1=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.jms:javax.jms-api:2.0.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.json:javax.json-api:1.0=testCompileClasspath,testRuntimeClasspath -javax.jws:javax.jws-api:1.1=testCompileClasspath,testRuntimeClasspath javax.servlet:javax.servlet-api:3.1.0=testCompileClasspath,testRuntimeClasspath -javax.transaction:javax.transaction-api:1.3=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.validation:validation-api:1.1.0.Final=testCompileClasspath,testRuntimeClasspath -javax.xml.bind:jaxb-api:2.3.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -javax.xml.soap:javax.xml.soap-api:1.4.0=testCompileClasspath,testRuntimeClasspath -javax.xml.ws:jaxws-api:2.3.1=testCompileClasspath,testRuntimeClasspath +javax.validation:validation-api:1.1.0.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath jaxen:jaxen:1.2.0=spotbugs -jboss:javassist:3.7.ga=testCompileClasspath,testRuntimeClasspath jline:jline:2.14.6=testRuntimeClasspath -joda-time:joda-time:2.9.1=testCompileClasspath,testRuntimeClasspath +joda-time:joda-time:2.10.2=muleServices +joda-time:joda-time:2.9.1=compileClasspath,testCompileClasspath,testRuntimeClasspath junit:junit-dep:4.11=testCompileClasspath,testRuntimeClasspath junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath net.bytebuddy:byte-buddy-agent:1.14.18=compileClasspath,instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath @@ -126,53 +152,57 @@ net.java.dev.jna:jna-platform:5.8.0=instrumentPluginClasspath,muzzleTooling,runt net.java.dev.jna:jna:5.8.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath net.jcip:jcip-annotations:1.0=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath net.jodah:failsafe:2.1.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -net.sf.jopt-simple:jopt-simple:5.0.3=testCompileClasspath,testRuntimeClasspath +net.sf.jopt-simple:jopt-simple:5.0.3=compileClasspath,testCompileClasspath,testRuntimeClasspath net.sf.saxon:Saxon-HE:11.4=spotbugs -org.antlr:antlr-runtime:3.5=testCompileClasspath,testRuntimeClasspath -org.antlr:stringtemplate:3.2.1=testCompileClasspath,testRuntimeClasspath +org.antlr:antlr-runtime:3.5.2=testCompileClasspath,testRuntimeClasspath org.apache.ant:ant-antlr:1.10.12=testRuntimeClasspath org.apache.ant:ant-antlr:1.9.15=codenarc org.apache.ant:ant-junit:1.10.12=testRuntimeClasspath org.apache.ant:ant-junit:1.9.15=codenarc org.apache.ant:ant-launcher:1.10.12=testRuntimeClasspath org.apache.ant:ant:1.10.12=testCompileClasspath,testRuntimeClasspath -org.apache.avro:avro:1.10.0-MULE_3=muleServices +org.apache.avro:avro:1.11.1=muleServices org.apache.bcel:bcel:6.5.0=spotbugs -org.apache.commons:commons-compress:1.19=muleServices -org.apache.commons:commons-lang3:3.12.0=spotbugs -org.apache.commons:commons-lang3:3.8.1=compileClasspath,muleServices,testCompileClasspath,testRuntimeClasspath -org.apache.commons:commons-math3:3.6.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.apache.commons:commons-pool2:2.6.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-collections4:4.4=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-compress:1.21=muleServices +org.apache.commons:commons-lang3:3.12.0=compileClasspath,muleServices,spotbugs,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-pool2:2.11.1=compileClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-text:1.10.0=spotbugs org.apache.commons:commons-text:1.3=muleServices -org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:2.0.0=compileClasspath,testCompileClasspath,testRuntimeClasspath org.apache.geronimo.specs:geronimo-servlet_3.0_spec:1.0=muleServices org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs org.apache.httpcomponents.core5:httpcore5-h2:5.1.3=spotbugs org.apache.httpcomponents.core5:httpcore5:5.1.3=spotbugs -org.apache.httpcomponents:httpclient:4.5.3=testCompileClasspath -org.apache.httpcomponents:httpclient:4.5.4=testRuntimeClasspath -org.apache.httpcomponents:httpcore:4.4.6=testCompileClasspath -org.apache.httpcomponents:httpcore:4.4.7=testRuntimeClasspath -org.apache.logging.log4j:log4j-1.2-api:2.11.0=testCompileClasspath,testRuntimeClasspath -org.apache.logging.log4j:log4j-api:2.11.0=testCompileClasspath,testRuntimeClasspath +org.apache.httpcomponents:httpclient:4.5.14=testCompileClasspath,testRuntimeClasspath +org.apache.httpcomponents:httpcore:4.4.16=testCompileClasspath,testRuntimeClasspath +org.apache.logging.log4j:log4j-1.2-api:2.20.0=testCompileClasspath,testRuntimeClasspath org.apache.logging.log4j:log4j-api:2.19.0=spotbugs -org.apache.logging.log4j:log4j-core:2.11.0=testCompileClasspath,testRuntimeClasspath +org.apache.logging.log4j:log4j-api:2.20.0=testCompileClasspath,testRuntimeClasspath org.apache.logging.log4j:log4j-core:2.19.0=spotbugs -org.apache.maven:maven-aether-provider:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-artifact:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-builder-support:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-model-builder:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-model:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-repository-metadata:3.3.9=testCompileClasspath,testRuntimeClasspath -org.apache.maven:maven-settings-builder:3.3.9=testRuntimeClasspath -org.apache.maven:maven-settings:3.3.9=testRuntimeClasspath -org.apache.ws.xmlschema:xmlschema-core:2.2.1=testCompileClasspath,testRuntimeClasspath -org.apache.xmlbeans:xmlbeans:2.6.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.checkerframework:checker-qual:2.0.0=muleServices -org.checkerframework:checker-qual:2.10.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.logging.log4j:log4j-core:2.20.0=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-api:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-connector-basic:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-impl:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-named-locks:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-spi:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-supplier:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-transport-file:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-transport-http:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-transport-wagon:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.resolver:maven-resolver-util:1.9.15=testCompileClasspath,testRuntimeClasspath +org.apache.maven.wagon:wagon-http-shared:3.4.2=testCompileClasspath,testRuntimeClasspath +org.apache.maven.wagon:wagon-http:3.4.2=testCompileClasspath,testRuntimeClasspath +org.apache.maven.wagon:wagon-provider-api:3.4.2=testCompileClasspath,testRuntimeClasspath +org.apache.maven:maven-builder-support:3.9.4=testCompileClasspath,testRuntimeClasspath +org.apache.maven:maven-resolver-provider:3.9.4=testCompileClasspath,testRuntimeClasspath +org.apache.maven:maven-settings-builder:3.9.4=testCompileClasspath,testRuntimeClasspath +org.apache.maven:maven-settings:3.9.4=testCompileClasspath,testRuntimeClasspath +org.apache.ws.xmlschema:xmlschema-core:2.2.1=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.xmlbeans:xmlbeans:3.1.0=compileClasspath,muleServices,testCompileClasspath,testRuntimeClasspath +org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:2.5.2=annotationProcessor,testAnnotationProcessor +org.checkerframework:checker-qual:3.10.0=muleServices +org.checkerframework:checker-qual:3.33.0=compileClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.groovy:groovy-all:3.0.17=testCompileClasspath,testRuntimeClasspath org.codehaus.groovy:groovy-ant:2.5.14=codenarc org.codehaus.groovy:groovy-ant:3.0.17=testCompileClasspath,testRuntimeClasspath @@ -202,120 +232,174 @@ org.codehaus.groovy:groovy-xml:2.5.14=codenarc org.codehaus.groovy:groovy-xml:3.0.17=testCompileClasspath,testRuntimeClasspath org.codehaus.groovy:groovy:2.5.14=codenarc org.codehaus.groovy:groovy:3.0.17=testCompileClasspath,testRuntimeClasspath -org.codehaus.mojo:animal-sniffer-annotations:1.14=compileClasspath,muleServices -org.codehaus.mojo:animal-sniffer-annotations:1.17=annotationProcessor,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-component-annotations:1.6=testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-interpolation:1.21=testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-utils:3.0.24=testCompileClasspath,testRuntimeClasspath -org.codehaus.woodstox:stax2-api:4.0.0=muleServices +org.codehaus.mojo:animal-sniffer-annotations:1.17=annotationProcessor,testAnnotationProcessor +org.codehaus.plexus:plexus-cipher:2.0=testCompileClasspath,testRuntimeClasspath +org.codehaus.plexus:plexus-component-annotations:1.5.5=testCompileClasspath,testRuntimeClasspath +org.codehaus.plexus:plexus-interpolation:1.26=testCompileClasspath,testRuntimeClasspath +org.codehaus.plexus:plexus-sec-dispatcher:2.0=testCompileClasspath,testRuntimeClasspath +org.codehaus.plexus:plexus-utils:3.5.1=testCompileClasspath,testRuntimeClasspath +org.codehaus.woodstox:stax2-api:4.2.1=muleServices org.codenarc:CodeNarc:2.2.0=codenarc -org.dom4j:dom4j:2.1.1=testCompileClasspath,testRuntimeClasspath -org.dom4j:dom4j:2.1.3=spotbugs -org.eclipse.aether:aether-api:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-connector-basic:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-impl:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-spi:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-transport-file:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-transport-http:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath -org.eclipse.aether:aether-util:1.0.2.v20150114=testCompileClasspath,testRuntimeClasspath +org.dom4j:dom4j:2.1.3=spotbugs,testCompileClasspath,testRuntimeClasspath org.eclipse.jetty:jetty-http:9.4.56.v20240826=testCompileClasspath,testRuntimeClasspath org.eclipse.jetty:jetty-io:9.4.56.v20240826=testCompileClasspath,testRuntimeClasspath org.eclipse.jetty:jetty-server:9.4.56.v20240826=testCompileClasspath,testRuntimeClasspath org.eclipse.jetty:jetty-util:9.4.56.v20240826=testCompileClasspath,testRuntimeClasspath -org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.2=testRuntimeClasspath +org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5=testCompileClasspath,testRuntimeClasspath +org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.5=testCompileClasspath,testRuntimeClasspath org.everit.json:org.everit.json.schema:1.5.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.glassfish:javax.json:1.0.4=testCompileClasspath,testRuntimeClasspath +org.glassfish:jakarta.json:1.1.6=compileClasspath,testCompileClasspath,testRuntimeClasspath org.gmetrics:GMetrics:1.1=codenarc +org.graalvm.js:js-scriptengine:21.0.0.2=muleServices +org.graalvm.js:js:21.0.0.2=muleServices +org.graalvm.regex:regex:21.0.0.2=muleServices +org.graalvm.sdk:graal-sdk:21.0.0.2=muleServices +org.graalvm.truffle:truffle-api:21.0.0.2=muleServices org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=testCompileClasspath,testRuntimeClasspath org.jctools:jctools-core:3.3.0=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.jgrapht:jgrapht-jdk1.5:0.7.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20=testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.20=testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20=testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.6.20=testRuntimeClasspath +org.jetbrains:annotations:13.0=testRuntimeClasspath +org.jgrapht:jgrapht-core:1.3.1=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.jheaps:jheaps:0.10=compileClasspath,testCompileClasspath,testRuntimeClasspath org.json:json:20160810=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.jsoup:jsoup:1.11.3=testCompileClasspath,testRuntimeClasspath +org.json:json:20230227=muleServices +org.jsoup:jsoup:1.15.3=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.9.2=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.9.2=testRuntimeClasspath -org.junit.platform:junit-platform-commons:1.9.2=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:1.9.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-commons:1.9.0=testCompileClasspath +org.junit.platform:junit-platform-commons:1.9.2=testRuntimeClasspath +org.junit.platform:junit-platform-engine:1.9.0=testCompileClasspath +org.junit.platform:junit-platform-engine:1.9.2=testRuntimeClasspath org.junit.platform:junit-platform-launcher:1.9.2=testRuntimeClasspath -org.junit.platform:junit-platform-runner:1.9.2=testRuntimeClasspath -org.junit.platform:junit-platform-suite-api:1.9.2=testRuntimeClasspath -org.junit.platform:junit-platform-suite-commons:1.9.2=testRuntimeClasspath +org.junit.platform:junit-platform-runner:1.9.0=testRuntimeClasspath +org.junit.platform:junit-platform-suite-api:1.9.0=testRuntimeClasspath +org.junit.platform:junit-platform-suite-commons:1.9.0=testRuntimeClasspath +org.junit:junit-bom:5.9.0=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.1=spotbugs -org.junit:junit-bom:5.9.2=testCompileClasspath,testRuntimeClasspath -org.jvnet.staxex:stax-ex:1.8=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mozilla:rhino:1.7.7.1=testCompileClasspath,testRuntimeClasspath -org.mule.apache:xerces2-xsd11:2.11.3=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mozilla:rhino:1.7.12=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.apache:xerces2-xsd11:2.11.3=muleServices +org.mule.apache:xerces2-xsd11:2.11.3-MULE-001=compileClasspath,testCompileClasspath,testRuntimeClasspath org.mule.com.github.stephenc.eaio-uuid:uuid:3.4.2-MULE-001=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.common:scala-common_2.12:0.4.0=muleServices -org.mule.glassfish.grizzly:connection-pool:2.3.36-MULE-011=muleServices -org.mule.glassfish.grizzly:grizzly-framework:2.3.36-MULE-011=muleServices -org.mule.glassfish.grizzly:grizzly-http-client:1.14-MULE-012=muleServices -org.mule.glassfish.grizzly:grizzly-http-server:2.3.36-MULE-011=muleServices -org.mule.glassfish.grizzly:grizzly-http-servlet:2.3.36-MULE-011=muleServices -org.mule.glassfish.grizzly:grizzly-http:2.3.36-MULE-011=muleServices -org.mule.glassfish.grizzly:grizzly-websockets:2.3.36-MULE-011=muleServices -org.mule.glassfish.jaxb:jaxb-runtime:2.3.1-MULE-001=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.glassfish.jaxb:txw2:2.3.1-MULE-001=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.mvel:mule-mvel2:2.1.9-MULE-018=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:api-annotations:1.1.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-api:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-artifact-declaration:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-core:4.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-extensions-api-dsql:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-extensions-api-persistence:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-extensions-api:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-extensions-soap-api:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-message-metadata-model:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-api:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-catalog:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-java:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-json:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-persistence:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-raml:1.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-metadata-model-xml:1.2.2=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-artifact:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-container:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-deployment-model-impl:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-deployment-model:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-deployment:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-dsl-api:1.2.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-extensions-soap-support:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-extensions-spring-support:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-extensions-support:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-extensions-xml-support:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-global-config:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-http-policy-api:1.2.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-javaee:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-launcher:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-license-api:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-logging:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-policy-api:1.2.1=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-reboot:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-repository:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-service:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-spring-config:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-tls:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-module-tooling-support:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-service-http-api:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-service-oauth-api:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.runtime:mule-service-soap-api:4.2.2=testCompileClasspath,testRuntimeClasspath -org.mule.services:mule-service-http:1.4.7=muleServices -org.mule.services:mule-service-scheduler:1.2.4=muleServices -org.mule.services:mule-service-weave:2.2.2=muleServices -org.mule.syaml:syaml_2.12:0.6.8=muleServices -org.mule.tools.maven:mule-classloader-model:3.3.4=testCompileClasspath,testRuntimeClasspath -org.mule.weave:avro-module:2.2.2=muleServices -org.mule.weave:core-modules:2.2.2=muleServices -org.mule.weave:core:2.2.2=muleServices -org.mule.weave:debugger:2.2.2=muleServices -org.mule.weave:java-module:2.2.2=muleServices -org.mule.weave:ndjson-module:2.2.2=muleServices -org.mule.weave:parser:2.2.2=muleServices -org.mule.weave:runtime:2.2.2=muleServices -org.mule.weave:wlang:2.2.2=muleServices -org.mule.weave:yaml-module:2.2.2=muleServices -org.mule:mule-maven-client-api:1.4.2=testCompileClasspath,testRuntimeClasspath -org.mule:mule-maven-client-impl:1.4.2=testRuntimeClasspath +org.mule.common:scala-common_2.12:2.0.99=muleServices +org.mule.commons:mule-oauth-client-api:2.0.0=testCompileClasspath,testRuntimeClasspath +org.mule.glassfish.grizzly:connection-pool:2.3.36-MULE-025=muleServices +org.mule.glassfish.grizzly:grizzly-framework:2.3.36-MULE-008=muleServices +org.mule.glassfish.grizzly:grizzly-http-client:1.14-MULE-021=muleServices +org.mule.glassfish.grizzly:grizzly-http-server:2.3.36-MULE-025=muleServices +org.mule.glassfish.grizzly:grizzly-http-servlet:2.3.36-MULE-025=muleServices +org.mule.glassfish.grizzly:grizzly-http:2.3.36-MULE-008=muleServices +org.mule.glassfish.grizzly:grizzly-websockets:2.3.36-MULE-025=muleServices +org.mule.mvel:mule-mvel2:2.1.9-MULE-020=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:api-annotations:1.4.1=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-ast-dependency-graph:1.1.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-ast-serialization:1.1.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-ast-xml-parser:1.1.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-ast:1.1.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-declaration-persistence:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-artifact-declaration:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-core-components:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-core-mvel:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-core:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-dwb-api:2.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-extensions-api-dsql:1.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-extensions-api-persistence:1.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-extensions-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-extensions-soap-api:1.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-jar-handling-utils:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-message-metadata-model:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-catalog:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-java:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-json:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-persistence:1.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-raml:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metadata-model-xml:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-api:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-exporter-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-exporter-configuration-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-exporter-configuration-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-exporter-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-metrics-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-artifact-activation:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-artifact:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-container:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-deployment-model-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-deployment-model:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-deployment:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-dsl-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-extensions-soap-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-extensions-spring-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-extensions-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-extensions-xml-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-feature-management:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-global-config:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-http-policy-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-javaee:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-jpms-utils:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-launcher:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-license-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-log4j-boot-configurator:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-log4j-configurator:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-logging:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-memory-management:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-metadata-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-policy-api:1.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-properties-config:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-reboot:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-repository:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-service:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-spring-config:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-tls:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-tooling-support:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-module-troubleshooting:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-profiling-api:1.1.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-properties-api:1.1.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-runtime-extension-model:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-service-http-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-service-oauth-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-service-soap-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-api:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-common:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-configuration-api:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-configuration-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-customization-api:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-customization-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-exporter-api:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-exporter-configuration-api:4.5.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-exporter-configuration-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-exporter-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.runtime:mule-tracer-internal-impl:4.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.sdk:mule-sdk-api:0.7.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.mule.sdk:mule-sdk-compatibility-api:0.7.0=testCompileClasspath,testRuntimeClasspath +org.mule.services:mule-service-http:1.5.21=muleServices +org.mule.services:mule-service-scheduler:1.5.0=muleServices +org.mule.services:mule-service-weave:2.5.0=muleServices +org.mule.syaml:syaml_2.12:2.0.334=muleServices +org.mule.tools.maven:mule-classloader-model:3.8.5=testCompileClasspath,testRuntimeClasspath +org.mule.weave:avro-module:2.5.0=muleServices +org.mule.weave:core-modules:2.5.0=muleServices +org.mule.weave:core:2.5.0=muleServices +org.mule.weave:debugger:2.5.0=muleServices +org.mule.weave:dwb-api:2.5.0=testCompileClasspath,testRuntimeClasspath +org.mule.weave:dwb-module:2.5.0=muleServices +org.mule.weave:java-module:2.5.0=muleServices +org.mule.weave:jsonschema-module:2.5.0=muleServices +org.mule.weave:ndjson-module:2.5.0=muleServices +org.mule.weave:parser:2.5.0=muleServices +org.mule.weave:runtime:2.5.0=muleServices +org.mule.weave:wlang:2.5.0=muleServices +org.mule.weave:xmlschema-module:2.5.0=muleServices +org.mule.weave:yaml-module:2.5.0=muleServices +org.mule:maven-model-shaded:2.0.0=testCompileClasspath,testRuntimeClasspath +org.mule:mule-maven-client-api:2.0.0=testCompileClasspath,testRuntimeClasspath +org.mule:mule-maven-client-impl:2.0.0=testCompileClasspath,testRuntimeClasspath +org.mule:mule-maven-pom-parser-api:2.0.0=testCompileClasspath,testRuntimeClasspath +org.mule:mule-maven-pom-parser-impl:2.0.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=testCompileClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testRuntimeClasspath org.ow2.asm:asm-analysis:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath @@ -328,42 +412,32 @@ org.ow2.asm:asm-util:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspat org.ow2.asm:asm-util:9.4=spotbugs org.ow2.asm:asm:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath org.ow2.asm:asm:9.4=spotbugs -org.parboiled:parboiled_2.12:2.1.5=muleServices +org.parboiled:parboiled_2.12:2.1.8=muleServices org.quartz-scheduler:quartz:2.3.2=muleServices -org.raml:raml-parser-2:1.0.40=testCompileClasspath,testRuntimeClasspath -org.raml:yagi:1.0.40=testCompileClasspath,testRuntimeClasspath -org.reactivestreams:reactive-streams:1.0.2=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.raml:raml-parser-2:1.0.44-10=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.raml:yagi:1.0.44-10=compileClasspath,testCompileClasspath,testRuntimeClasspath +org.reactivestreams:reactive-streams:1.0.4=compileClasspath,testCompileClasspath,testRuntimeClasspath org.reflections:reflections:0.9.10=compileClasspath,testCompileClasspath,testRuntimeClasspath -org.scala-lang:scala-library:2.12.7=muleServices -org.scala-lang:scala-reflect:2.12.0=muleServices -org.slf4j:jcl-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath -org.slf4j:jul-to-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath +org.scala-lang:scala-library:2.12.15=muleServices +org.slf4j:jcl-over-slf4j:2.0.7=testCompileClasspath,testRuntimeClasspath +org.slf4j:jul-to-slf4j:2.0.7=testCompileClasspath,testRuntimeClasspath org.slf4j:log4j-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath -org.slf4j:slf4j-api:1.7.25=muleServices -org.slf4j:slf4j-api:1.7.30=compileClasspath,instrumentPluginClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath -org.slf4j:slf4j-api:1.7.32=testRuntimeClasspath -org.slf4j:slf4j-api:2.0.0=spotbugs,spotbugsSlf4j +org.slf4j:slf4j-api:1.7.30=compileClasspath,instrumentPluginClasspath,muleServices,muzzleBootstrap,muzzleTooling,runtimeClasspath,spotbugs,spotbugsSlf4j,testCompileClasspath,testRuntimeClasspath org.slf4j:slf4j-simple:2.0.0=spotbugsSlf4j -org.sonatype.plexus:plexus-cipher:1.4=testRuntimeClasspath -org.sonatype.plexus:plexus-sec-dispatcher:1.3=testRuntimeClasspath org.spockframework:spock-core:2.2-groovy-3.0=testCompileClasspath,testRuntimeClasspath org.spockframework:spock-junit4:2.2-groovy-3.0=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-aop:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-beans:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-context:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-core:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-expression:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath -org.springframework:spring-jcl:5.1.6.RELEASE=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-aop:5.3.27=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-beans:5.3.27=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-context:5.3.27=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-core:5.3.27=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-expression:5.3.27=testCompileClasspath,testRuntimeClasspath +org.springframework:spring-jcl:5.3.27=testCompileClasspath,testRuntimeClasspath org.testng:testng:7.5=testRuntimeClasspath -org.typelevel:algebra_2.12:0.7.0=muleServices -org.typelevel:cats-kernel_2.12:0.9.0=muleServices -org.typelevel:machinist_2.12:0.6.1=muleServices +org.togglz:togglz-core:3.0.0=compileClasspath,testCompileClasspath,testRuntimeClasspath org.typelevel:macro-compat_2.12:1.1.1=muleServices -org.typelevel:spire-macros_2.12:0.14.1=muleServices -org.typelevel:spire_2.12:0.14.1=muleServices +org.vibur:vibur-object-pool:23.0=compileClasspath,testCompileClasspath,testRuntimeClasspath org.webjars:jquery:3.5.1=testRuntimeClasspath org.xmlresolver:xmlresolver:4.4.3=spotbugs -org.yaml:snakeyaml:1.21=compileClasspath,testCompileClasspath,testRuntimeClasspath -tanukisoft:wrapper:3.2.3=testCompileClasspath,testRuntimeClasspath -xml-apis:xml-apis:1.4.01=spotbugs +org.yaml:snakeyaml:2.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +xml-apis:xml-apis:1.4.01=spotbugs,testCompileClasspath,testRuntimeClasspath empty=spotbugsPlugins diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/AbstractMuleInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/AbstractMuleInstrumentation.java new file mode 100644 index 00000000000..be26ff448b1 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/AbstractMuleInstrumentation.java @@ -0,0 +1,36 @@ +package datadog.trace.instrumentation.mule4; + +import datadog.trace.agent.tooling.InstrumenterModule; +import java.util.HashMap; +import java.util.Map; + +public abstract class AbstractMuleInstrumentation extends InstrumenterModule.Tracing { + public AbstractMuleInstrumentation() { + super("mule"); + } + + @Override + protected boolean defaultEnabled() { + return false; + } + + @Override + public Map contextStore() { + final Map contextStore = new HashMap<>(); + contextStore.put("org.mule.runtime.api.event.EventContext", packageName + ".SpanState"); + contextStore.put( + "org.mule.runtime.tracer.api.span.info.InitialSpanInfo", + "org.mule.runtime.api.component.Component"); + return contextStore; + } + + @Override + public String[] helperClassNames() { + return new String[] { + packageName + ".MuleDecorator", + packageName + ".DDEventTracer", + packageName + ".SpanState", + packageName + ".NoopMuleSpan", + }; + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ComponentMessageProcessorInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ComponentMessageProcessorInstrumentation.java new file mode 100644 index 00000000000..91e45d89c70 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ComponentMessageProcessorInstrumentation.java @@ -0,0 +1,67 @@ +package datadog.trace.instrumentation.mule4; + +import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.named; +import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.namedOneOf; +import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activateSpan; +import static net.bytebuddy.matcher.ElementMatchers.isMethod; +import static net.bytebuddy.matcher.ElementMatchers.takesArgument; + +import com.google.auto.service.AutoService; +import datadog.trace.agent.tooling.Instrumenter; +import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.bootstrap.InstrumentationContext; +import datadog.trace.bootstrap.instrumentation.api.AgentScope; +import net.bytebuddy.asm.Advice; +import org.mule.runtime.api.event.EventContext; +import org.mule.runtime.core.api.event.CoreEvent; +import org.mule.runtime.tracer.api.EventTracer; + +/** + * Tries to activate the current event context span before dispatching the event to the current + * handler. + */ +@AutoService(InstrumenterModule.class) +public class ComponentMessageProcessorInstrumentation extends AbstractMuleInstrumentation + implements Instrumenter.ForSingleType { + + @Override + public String instrumentedType() { + return "org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor"; + } + + @Override + public void methodAdvice(MethodTransformer transformer) { + transformer.applyAdvice( + isMethod() + .and(namedOneOf("onEvent", "onEventSynchronous", "prepareAndExecuteOperation")) + .and(takesArgument(0, named("org.mule.runtime.core.api.event.CoreEvent"))), + getClass().getName() + "$ProcessAdvice"); + } + + public static class ProcessAdvice { + @Advice.OnMethodEnter(suppress = Throwable.class) + public static AgentScope before(@Advice.Argument(0) final CoreEvent event) { + if (event == null || event.getContext() == null) { + return null; + } + SpanState spanState = + InstrumentationContext.get(EventContext.class, SpanState.class).get(event.getContext()); + if (spanState != null && spanState.getEventContextSpan() != null) { + return activateSpan(spanState.getSpanContextSpan()); + } + return null; + } + + @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) + public static void after(@Advice.Enter final AgentScope scope) { + if (scope != null) { + scope.close(); + } + } + + private static void muzzleCheck(final EventTracer tracer) { + // introduced in 4.5.0 + tracer.endCurrentSpan(null); + } + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/CurrentEventHelper.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/CurrentEventHelper.java deleted file mode 100644 index c575cc07176..00000000000 --- a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/CurrentEventHelper.java +++ /dev/null @@ -1,34 +0,0 @@ -package datadog.trace.instrumentation.mule4; - -import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activateSpan; - -import datadog.trace.bootstrap.ContextStore; -import datadog.trace.bootstrap.instrumentation.api.AgentScope; -import datadog.trace.bootstrap.instrumentation.api.AgentSpan; -import org.mule.runtime.api.event.EventContext; -import org.mule.runtime.core.privileged.event.PrivilegedEvent; - -public class CurrentEventHelper { - // Keeps track of the activated scope for the currently processing event, so it can be closed - // properly - private static final ThreadLocal currentEventScope = new ThreadLocal<>(); - - public static void handleEventChange( - final PrivilegedEvent event, ContextStore contextStore) { - final AgentScope currentScope = currentEventScope.get(); - if (null != currentScope) { - currentScope.close(); - } - AgentScope newScope = null; - if (null != event) { - EventContext eventContext = event.getContext(); - if (null != eventContext) { - AgentSpan span = contextStore.get(eventContext); - if (null != span) { - newScope = activateSpan(span); - } - } - } - currentEventScope.set(newScope); - } -} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/DDEventTracer.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/DDEventTracer.java new file mode 100644 index 00000000000..64ac273326b --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/DDEventTracer.java @@ -0,0 +1,222 @@ +package datadog.trace.instrumentation.mule4; + +import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activeSpan; +import static datadog.trace.instrumentation.mule4.MuleDecorator.DECORATE; + +import datadog.trace.bootstrap.ContextStore; +import datadog.trace.bootstrap.instrumentation.api.AgentSpan; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; +import javax.annotation.Nonnull; +import org.mule.runtime.api.component.Component; +import org.mule.runtime.api.event.EventContext; +import org.mule.runtime.api.message.Error; +import org.mule.runtime.api.profiling.tracing.Span; +import org.mule.runtime.core.api.event.CoreEvent; +import org.mule.runtime.tracer.api.EventTracer; +import org.mule.runtime.tracer.api.context.getter.DistributedTraceContextGetter; +import org.mule.runtime.tracer.api.sniffer.SpanSnifferManager; +import org.mule.runtime.tracer.api.span.info.EnrichedInitialSpanInfo; +import org.mule.runtime.tracer.api.span.info.InitialSpanInfo; +import org.mule.runtime.tracer.api.span.validation.Assertion; +import org.mule.runtime.tracer.customization.impl.info.ExecutionInitialSpanInfo; +import org.mule.runtime.tracer.customization.impl.provider.LazyInitialSpanInfo; + +/** + * This class is responsible for translating span reported by mule internal observability into DD + * ones. + */ +public class DDEventTracer implements EventTracer { + /** Holds the link between mule event context <-> ddSpan */ + private final ContextStore eventContextStore; + + private final ContextStore componentContextStore; + + private final EventTracer delegate; + + public DDEventTracer( + ContextStore eventContextStore, + ContextStore componentContextStore, + EventTracer delegate) { + this.eventContextStore = eventContextStore; + this.componentContextStore = componentContextStore; + this.delegate = delegate; + } + + private AgentSpan maybeExtractCurrentSpan(final CoreEvent coreEvent) { + if (coreEvent == null || coreEvent.getContext() == null) { + return null; + } + SpanState spanState = eventContextStore.get(coreEvent.getContext()); + return spanState != null ? spanState.getSpanContextSpan() : null; + } + + private AgentSpan findParent(final EventContext eventContext) { + SpanState spanState = eventContextStore.get(eventContext); + if (spanState != null) { + return spanState.getEventContextSpan(); + } + return activeSpan(); + } + + private Component findComponent(final InitialSpanInfo initialSpanInfo) { + if (initialSpanInfo instanceof ExecutionInitialSpanInfo) { + return componentContextStore.get(initialSpanInfo); + } else if (initialSpanInfo instanceof LazyInitialSpanInfo) { + return findComponent(((LazyInitialSpanInfo) initialSpanInfo).getDelegate()); + } else if (initialSpanInfo instanceof EnrichedInitialSpanInfo) { + return findComponent(((EnrichedInitialSpanInfo) initialSpanInfo).getBaseInitialSpanInfo()); + } + return null; + } + + private void linkToContext(@Nonnull final EventContext eventContext, final AgentSpan span) { + final SpanState previousState = eventContextStore.get(eventContext); + final AgentSpan spanToLink; + if (span != null) { + spanToLink = span; + } else if (previousState != null) { + spanToLink = previousState.getEventContextSpan(); + } else { + spanToLink = null; + } + + eventContextStore.put( + eventContext, new SpanState(spanToLink, previousState).withSpanContextSpan(span)); + } + + private void handleNewSpan(CoreEvent event, InitialSpanInfo spanInfo) { + if (event == null || event.getContext() == null) { + // we cannot store properly the span in the context. + return; + } + + final EventContext eventContext = event.getContext(); + + final AgentSpan span = + DECORATE.onMuleSpan(findParent(eventContext), spanInfo, event, findComponent(spanInfo)); + linkToContext(eventContext, span); + } + + private void handleEndOfSpan(CoreEvent event) { + if (event == null || event.getContext() == null) { + return; + } + final EventContext eventContext = event.getContext(); + final SpanState spanState = eventContextStore.get(eventContext); + if (spanState == null) { + return; + } + if (spanState.getSpanContextSpan() != null) { + final AgentSpan span = spanState.getSpanContextSpan(); + DECORATE.beforeFinish(span).finish(); + } + eventContextStore.put(eventContext, spanState.getPreviousState()); + } + + @Override + public Optional startSpan(CoreEvent event, InitialSpanInfo spanInfo) { + handleNewSpan(event, spanInfo); + final Optional span = delegate.startSpan(event, spanInfo); + if (span.isPresent()) { + return span; + } + return NoopMuleSpan.INSTANCE; + } + + @Override + public Optional startSpan(CoreEvent event, InitialSpanInfo spanInfo, Assertion assertion) { + handleNewSpan(event, spanInfo); + final Optional span = delegate.startSpan(event, spanInfo, assertion); + if (span.isPresent()) { + return span; + } + return NoopMuleSpan.INSTANCE; + } + + @Override + public void endCurrentSpan(CoreEvent event) { + try { + delegate.endCurrentSpan(event); + } finally { + handleEndOfSpan(event); + } + } + + @Override + public void endCurrentSpan(CoreEvent event, Assertion condition) { + try { + delegate.endCurrentSpan(event, condition); + } finally { + handleEndOfSpan(event); + } + } + + @Override + public void injectDistributedTraceContext( + EventContext eventContext, DistributedTraceContextGetter distributedTraceContextGetter) { + // TODO: we do not use it today since we've our injectors. However it can be handy in case we do + // not support some connectors + delegate.injectDistributedTraceContext(eventContext, distributedTraceContextGetter); + } + + @Override + public void recordErrorAtCurrentSpan( + CoreEvent event, Supplier errorSupplier, boolean isErrorEscapingCurrentSpan) { + try { + delegate.recordErrorAtCurrentSpan(event, errorSupplier, isErrorEscapingCurrentSpan); + } finally { + final AgentSpan span = maybeExtractCurrentSpan(event); + if (span != null) { + final Error error = errorSupplier.get(); + if (error != null && error.getCause() != null) { + DECORATE.onError(span, error.getCause()); + } + } + } + } + + @Override + public void setCurrentSpanName(CoreEvent event, String name) { + try { + delegate.setCurrentSpanName(event, name); + } finally { + final AgentSpan span = maybeExtractCurrentSpan(event); + if (span != null) { + span.setResourceName(name); + } + } + } + + @Override + public void addCurrentSpanAttribute(CoreEvent event, String key, String value) { + try { + delegate.addCurrentSpanAttribute(event, key, value); + } finally { + final AgentSpan span = maybeExtractCurrentSpan(event); + if (span != null) { + span.setTag(key, value); + } + } + } + + @Override + public void addCurrentSpanAttributes(CoreEvent event, Map attributes) { + try { + delegate.addCurrentSpanAttributes(event, attributes); + } finally { + final AgentSpan span = maybeExtractCurrentSpan(event); + if (span != null) { + for (Map.Entry entry : attributes.entrySet()) { + span.setTag(entry.getKey(), entry.getValue()); + } + } + } + } + + @Override + public SpanSnifferManager getSpanSnifferManager() { + return delegate.getSpanSnifferManager(); + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextCreationAdvice.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextCreationAdvice.java index a41cf2cb60d..478584e33bb 100644 --- a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextCreationAdvice.java +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextCreationAdvice.java @@ -5,10 +5,10 @@ import datadog.trace.bootstrap.CallDepthThreadLocalMap; import datadog.trace.bootstrap.ContextStore; import datadog.trace.bootstrap.InstrumentationContext; -import datadog.trace.bootstrap.instrumentation.api.AgentSpan; import net.bytebuddy.asm.Advice; import org.mule.runtime.api.event.EventContext; import org.mule.runtime.core.internal.event.DefaultEventContext; +import org.mule.runtime.tracer.api.EventTracer; public class EventContextCreationAdvice { @Advice.OnMethodEnter(suppress = Throwable.class) @@ -27,21 +27,28 @@ public static void onExit( } CallDepthThreadLocalMap.reset(EventContext.class); - final ContextStore contextStore = - InstrumentationContext.get(EventContext.class, AgentSpan.class); - AgentSpan span = null; + final ContextStore contextStore = + InstrumentationContext.get(EventContext.class, SpanState.class); + SpanState spanState = null; // This is a roundabout way to know if we are in the constructor for DefaultEventContext or // ChildContext. Since ChildContext is is a private inner class, we can't access it from here. if (zis instanceof DefaultEventContext) { - span = activeSpan(); + spanState = new SpanState(activeSpan(), null); } else if (arg instanceof EventContext) { // This means that we are in the constructor for ChildContext and we should copy the span // from the parent EventContext which is the first argument. - span = contextStore.get((EventContext) arg); - } - if (null != span) { - contextStore.put(zis, span); + final SpanState parentState = contextStore.get((EventContext) arg); + if (parentState != null) { + spanState = new SpanState(parentState.getEventContextSpan(), null); + } } + + contextStore.put(zis, spanState); + } + + private static void muzzleCheck(final EventTracer tracer) { + // introduced in 4.5.0 + tracer.endCurrentSpan(null); } } diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextInstrumentation.java index ee0681098d1..bcc465d19cc 100644 --- a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextInstrumentation.java +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventContextInstrumentation.java @@ -1,12 +1,10 @@ package datadog.trace.instrumentation.mule4; -import static java.util.Collections.singletonMap; import static net.bytebuddy.matcher.ElementMatchers.isConstructor; import com.google.auto.service.AutoService; import datadog.trace.agent.tooling.Instrumenter; import datadog.trace.agent.tooling.InstrumenterModule; -import java.util.Map; /** * Events in Mule have an {@code EventContext} attached to them, that travels with the event through @@ -14,18 +12,9 @@ * and activate/deactivate the span when mule changes which event it is processing. */ @AutoService(InstrumenterModule.class) -public final class EventContextInstrumentation extends InstrumenterModule.Tracing +public final class EventContextInstrumentation extends AbstractMuleInstrumentation implements Instrumenter.ForKnownTypes { - public EventContextInstrumentation() { - super("mule"); - } - - @Override - protected boolean defaultEnabled() { - return false; - } - @Override public String[] knownMatchingTypes() { return new String[] { @@ -35,14 +24,12 @@ public String[] knownMatchingTypes() { } @Override - public Map contextStore() { - return singletonMap( - "org.mule.runtime.api.event.EventContext", - "datadog.trace.bootstrap.instrumentation.api.AgentSpan"); + public void methodAdvice(MethodTransformer transformer) { + transformer.applyAdvice(isConstructor(), packageName + ".EventContextCreationAdvice"); } @Override - public void methodAdvice(MethodTransformer transformer) { - transformer.applyAdvice(isConstructor(), packageName + ".EventContextCreationAdvice"); + public String muzzleDirective() { + return "before-4.5.0"; } } diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventTracerInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventTracerInstrumentation.java new file mode 100644 index 00000000000..82069ff2d74 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/EventTracerInstrumentation.java @@ -0,0 +1,43 @@ +package datadog.trace.instrumentation.mule4; + +import com.google.auto.service.AutoService; +import datadog.trace.agent.tooling.Instrumenter; +import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers; +import datadog.trace.bootstrap.InstrumentationContext; +import net.bytebuddy.asm.Advice; +import org.mule.runtime.api.component.Component; +import org.mule.runtime.api.event.EventContext; +import org.mule.runtime.core.api.event.CoreEvent; +import org.mule.runtime.tracer.api.EventTracer; +import org.mule.runtime.tracer.api.span.info.InitialSpanInfo; + +@AutoService(InstrumenterModule.class) +public class EventTracerInstrumentation extends AbstractMuleInstrumentation + implements Instrumenter.ForSingleType { + + @Override + public String instrumentedType() { + return "org.mule.runtime.tracer.impl.SelectableCoreEventTracer"; + } + + @Override + public void methodAdvice(MethodTransformer transformer) { + transformer.applyAdvice( + NameMatchers.named("updateSelectedCoreEventTracer"), + getClass().getName() + "$SwapCoreTracerAdvice"); + } + + public static class SwapCoreTracerAdvice { + @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) + public static void afterInit( + @Advice.FieldValue(value = "selectedCoreEventTracer", readOnly = false) + EventTracer eventTracer) { + eventTracer = + new DDEventTracer( + InstrumentationContext.get(EventContext.class, SpanState.class), + InstrumentationContext.get(InitialSpanInfo.class, Component.class), + eventTracer); + } + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ExecutionInitialSpanInfoInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ExecutionInitialSpanInfoInstrumentation.java new file mode 100644 index 00000000000..80083de1848 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/ExecutionInitialSpanInfoInstrumentation.java @@ -0,0 +1,39 @@ +package datadog.trace.instrumentation.mule4; + +import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.isConstructor; +import static net.bytebuddy.matcher.ElementMatchers.takesArgument; + +import com.google.auto.service.AutoService; +import datadog.trace.agent.tooling.Instrumenter; +import datadog.trace.agent.tooling.InstrumenterModule; +import datadog.trace.bootstrap.InstrumentationContext; +import net.bytebuddy.asm.Advice; +import org.mule.runtime.api.component.Component; +import org.mule.runtime.tracer.api.span.info.InitialSpanInfo; +import org.mule.runtime.tracer.customization.impl.info.ExecutionInitialSpanInfo; + +@AutoService(InstrumenterModule.class) +public class ExecutionInitialSpanInfoInstrumentation extends AbstractMuleInstrumentation + implements Instrumenter.ForSingleType { + + @Override + public String instrumentedType() { + return "org.mule.runtime.tracer.customization.impl.info.ExecutionInitialSpanInfo"; + } + + @Override + public void methodAdvice(MethodTransformer transformer) { + transformer.applyAdvice( + isConstructor().and(takesArgument(0, named("org.mule.runtime.api.component.Component"))), + getClass().getName() + "$StoreComponentAdvice"); + } + + public static class StoreComponentAdvice { + @Advice.OnMethodExit(suppress = Throwable.class) + public static void afterConstruct( + @Advice.This ExecutionInitialSpanInfo self, @Advice.Argument(0) final Component component) { + InstrumentationContext.get(InitialSpanInfo.class, Component.class).put(self, component); + } + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/MuleDecorator.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/MuleDecorator.java new file mode 100644 index 00000000000..ecd17b30a15 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/MuleDecorator.java @@ -0,0 +1,94 @@ +package datadog.trace.instrumentation.mule4; + +import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.startSpan; +import static datadog.trace.bootstrap.instrumentation.api.InstrumentationTags.MULE_CORRELATION_ID; +import static datadog.trace.bootstrap.instrumentation.api.InstrumentationTags.MULE_LOCATION; + +import datadog.trace.api.Functions; +import datadog.trace.api.cache.DDCache; +import datadog.trace.api.cache.DDCaches; +import datadog.trace.bootstrap.instrumentation.api.AgentSpan; +import datadog.trace.bootstrap.instrumentation.api.InternalSpanTypes; +import datadog.trace.bootstrap.instrumentation.api.Tags; +import datadog.trace.bootstrap.instrumentation.api.UTF8BytesString; +import datadog.trace.bootstrap.instrumentation.decorator.BaseDecorator; +import java.util.function.Function; +import org.mule.runtime.api.component.Component; +import org.mule.runtime.core.api.event.CoreEvent; +import org.mule.runtime.tracer.api.span.info.InitialSpanInfo; + +public class MuleDecorator extends BaseDecorator { + private static final CharSequence MULE = UTF8BytesString.create("mule"); + private static final CharSequence OPERATION_NAME = UTF8BytesString.create("mule.action"); + public static final MuleDecorator DECORATE = new MuleDecorator(); + private static final DDCache TAG_CACHE = DDCaches.newFixedSizeCache(128); + private static final Function TAG_ADDER = + new Functions.Prefix("mule.").andThen(new Functions.ToString<>()); + private static final DDCache COMPONENT_DOC_CACHE = + DDCaches.newFixedSizeCache(1014); + private static final Function COMPONENT_DOC_ADDER = + component -> { + final Object ret = component.getAnnotation(Component.Annotations.NAME_ANNOTATION_KEY); + if (ret != null) { + return ret.toString(); + } + return null; + }; + + @Override + protected String[] instrumentationNames() { + return new String[] {MULE.toString()}; + } + + @Override + protected CharSequence spanType() { + return InternalSpanTypes.MULE; + } + + @Override + protected CharSequence component() { + return MULE; + } + + @Override + public AgentSpan afterStart(final AgentSpan span) { + span.setMeasured(true); + span.setTag(Tags.SPAN_KIND, Tags.SPAN_KIND_INTERNAL); + return super.afterStart(span); + } + + public AgentSpan onMuleSpan( + AgentSpan parentSpan, InitialSpanInfo spanInfo, CoreEvent event, Component component) { + // we stick with the same level of detail of OTEL exporter. + // if not exportable we're not going to create a real span but we still need to track those + // spans to keep a correct hierarchy. + if (spanInfo.getInitialExportInfo() != null + && !spanInfo.getInitialExportInfo().isExportable()) { + return null; + } + final AgentSpan span; + if (parentSpan == null) { + span = startSpan(OPERATION_NAME); + } else { + span = startSpan(OPERATION_NAME, parentSpan.context()); + } + // here we have to use the forEachAttribute since each specialized InitialSpanInfo class can add + // different things through this method. Using the map version is not the same. + spanInfo.forEachAttribute((s, s2) -> span.setTag(TAG_CACHE.computeIfAbsent(s, TAG_ADDER), s2)); + span.setTag(MULE_CORRELATION_ID, event.getCorrelationId()); + // cache the resource name might be complex since it depends on a couple of keys + String extraDetail = null; + if (component != null) { + extraDetail = COMPONENT_DOC_CACHE.computeIfAbsent(component, COMPONENT_DOC_ADDER); + } + if (extraDetail == null) { + extraDetail = (String) span.getTag(MULE_LOCATION); + } + if (extraDetail != null) { + span.setResourceName(spanInfo.getName() + " " + extraDetail); + } else { + span.setResourceName(spanInfo.getName()); + } + return afterStart(span); + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/NoopMuleSpan.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/NoopMuleSpan.java new file mode 100644 index 00000000000..c5aa1cc8ca4 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/NoopMuleSpan.java @@ -0,0 +1,43 @@ +package datadog.trace.instrumentation.mule4; + +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import org.mule.runtime.api.profiling.tracing.Span; +import org.mule.runtime.api.profiling.tracing.SpanDuration; +import org.mule.runtime.api.profiling.tracing.SpanError; +import org.mule.runtime.api.profiling.tracing.SpanIdentifier; + +public class NoopMuleSpan implements Span { + public static final Optional INSTANCE = Optional.of(new NoopMuleSpan()); + + @Override + public Span getParent() { + return null; + } + + @Override + public SpanIdentifier getIdentifier() { + return SpanIdentifier.INVALID_SPAN_IDENTIFIER; + } + + @Override + public String getName() { + return ""; + } + + @Override + public SpanDuration getDuration() { + return null; + } + + @Override + public List getErrors() { + return Collections.emptyList(); + } + + @Override + public boolean hasErrors() { + return false; + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventInstrumentation.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventInstrumentation.java deleted file mode 100644 index 1dbc1c93385..00000000000 --- a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventInstrumentation.java +++ /dev/null @@ -1,51 +0,0 @@ -package datadog.trace.instrumentation.mule4; - -import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.named; -import static java.util.Collections.singletonMap; - -import com.google.auto.service.AutoService; -import datadog.trace.agent.tooling.Instrumenter; -import datadog.trace.agent.tooling.InstrumenterModule; -import java.util.Map; - -/** - * The {@code PrivilegedEvent} has a method that is called to set which {@code Event} is currently - * being processed on this {@code Thread}. We activate/deactivate the span associated to that {@code - * Event} via its {@code EventContext}. - */ -@AutoService(InstrumenterModule.class) -public final class PrivilegedEventInstrumentation extends InstrumenterModule.Tracing - implements Instrumenter.ForSingleType { - - public PrivilegedEventInstrumentation() { - super("mule"); - } - - @Override - protected boolean defaultEnabled() { - return false; - } - - @Override - public String instrumentedType() { - return "org.mule.runtime.core.privileged.event.PrivilegedEvent"; - } - - @Override - public Map contextStore() { - return singletonMap( - "org.mule.runtime.api.event.EventContext", - "datadog.trace.bootstrap.instrumentation.api.AgentSpan"); - } - - @Override - public void methodAdvice(MethodTransformer transformer) { - transformer.applyAdvice( - named("setCurrentEvent"), packageName + ".PrivilegedEventSetCurrentAdvice"); - } - - @Override - public String[] helperClassNames() { - return new String[] {packageName + ".CurrentEventHelper"}; - } -} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventSetCurrentAdvice.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventSetCurrentAdvice.java deleted file mode 100644 index 0abe4f13675..00000000000 --- a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/PrivilegedEventSetCurrentAdvice.java +++ /dev/null @@ -1,15 +0,0 @@ -package datadog.trace.instrumentation.mule4; - -import datadog.trace.bootstrap.InstrumentationContext; -import datadog.trace.bootstrap.instrumentation.api.AgentSpan; -import net.bytebuddy.asm.Advice; -import org.mule.runtime.api.event.EventContext; -import org.mule.runtime.core.privileged.event.PrivilegedEvent; - -public class PrivilegedEventSetCurrentAdvice { - @Advice.OnMethodEnter(suppress = Throwable.class) - public static void onEnter(@Advice.Argument(0) final PrivilegedEvent event) { - CurrentEventHelper.handleEventChange( - event, InstrumentationContext.get(EventContext.class, AgentSpan.class)); - } -} diff --git a/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/SpanState.java b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/SpanState.java new file mode 100644 index 00000000000..2a531689289 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/main/java/datadog/trace/instrumentation/mule4/SpanState.java @@ -0,0 +1,43 @@ +package datadog.trace.instrumentation.mule4; + +import datadog.trace.bootstrap.instrumentation.api.AgentSpan; + +public class SpanState { + private final AgentSpan eventContextSpan; + private final SpanState previousState; + private AgentSpan spanContextSpan; + + public SpanState(AgentSpan eventContextSpan, SpanState previousState) { + this.eventContextSpan = eventContextSpan; + this.previousState = previousState; + } + + public AgentSpan getEventContextSpan() { + return eventContextSpan; + } + + public SpanState getPreviousState() { + return previousState; + } + + public AgentSpan getSpanContextSpan() { + return spanContextSpan; + } + + public SpanState withSpanContextSpan(AgentSpan spanContextSpan) { + this.spanContextSpan = spanContextSpan; + return this; + } + + @Override + public String toString() { + return "SpanState{" + + "eventContextSpan=" + + eventContextSpan + + ", previousState=" + + previousState + + ", spanContextSpan=" + + spanContextSpan + + '}'; + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleForkedTest.groovy b/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleForkedTest.groovy index 7edddae3ce4..e77c2469f81 100644 --- a/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleForkedTest.groovy +++ b/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleForkedTest.groovy @@ -1,10 +1,16 @@ package mule4 +import static datadog.trace.agent.test.server.http.TestHttpServer.httpServer +import static mule4.MuleTestApplicationConstants.TEST_APPLICATION_JAR +import static mule4.MuleTestApplicationConstants.TEST_APPLICATION_NAME +import static org.mule.runtime.api.util.MuleTestUtil.muleSpan + import com.squareup.moshi.Moshi import com.squareup.moshi.Types import datadog.trace.agent.test.base.WithHttpServer import datadog.trace.api.DDSpanTypes import datadog.trace.bootstrap.instrumentation.api.Tags +import datadog.trace.core.DDSpan import datadog.trace.instrumentation.aws.ExpectedQueryParams import okhttp3.HttpUrl import okhttp3.MediaType @@ -13,9 +19,6 @@ import okhttp3.RequestBody import spock.lang.AutoCleanup import spock.lang.Shared -import static datadog.trace.agent.test.server.http.TestHttpServer.httpServer -import static mule4.MuleTestApplicationConstants.* - class MuleForkedTest extends WithHttpServer { // TODO since mule uses reactor core, things sometime propagate to places where they're not closed @@ -27,10 +30,7 @@ class MuleForkedTest extends WithHttpServer { @Override protected void configurePreAgent() { super.configurePreAgent() - - injectSysConfig("integration.grizzly-filterchain.enabled", "true") injectSysConfig("integration.mule.enabled", "true") - injectSysConfig("integration.grizzly-client.enabled", "true") } @AutoCleanup @@ -64,8 +64,8 @@ class MuleForkedTest extends WithHttpServer { container.start() def appProperties = new Properties() def reqUri = requestServer.address - ["test.server.port": "$port", "test.server.host": "localhost", "test.request.port": "${reqUri.port}", - "test.request.host": "${reqUri.host}", "test.request.path": "/remote-client-request", + ["test.server.port" : "$port", "test.server.host": "localhost", "test.request.port": "${reqUri.port}", + "test.request.host" : "${reqUri.host}", "test.request.path": "/remote-client-request", "test.request.pfe_path": "/remote-pfe-request"].each { // Force cast GStringImpl to String since Mule code does String casts of some properties appProperties.put((String) it.key, (String) it.value) @@ -93,9 +93,9 @@ class MuleForkedTest extends WithHttpServer { response.code() == 200 response.body().string() == "Hello Client." assertTraces(1) { - trace(2) { + trace(4) { sortSpansByStart() - span(0) { + span { operationName operation() resourceName "GET /client-request" spanType DDSpanTypes.HTTP_SERVER @@ -113,8 +113,10 @@ class MuleForkedTest extends WithHttpServer { defaultTags() } } - span(1) { - childOf(span(0)) + muleSpan(it, "mule:flow", "MuleHttpServerClientTestFlow") + muleSpan(it, "http:request", "Http Request") + span { + childOfPrevious() operationName "http.request" resourceName "GET /remote-client-request" spanType DDSpanTypes.HTTP_CLIENT @@ -125,7 +127,7 @@ class MuleForkedTest extends WithHttpServer { "$Tags.HTTP_STATUS" 200 "$Tags.HTTP_URL" "${requestServer.address.resolve("/remote-client-request")}" "$Tags.PEER_HOSTNAME" "localhost" - "$Tags.PEER_PORT" { true } // is this really the best way to ignore tags? + "$Tags.PEER_PORT" { Integer } defaultTags() } } @@ -138,7 +140,7 @@ class MuleForkedTest extends WithHttpServer { def names = ["Alyssa", "Ben", "Cy", "Eva", "Lem", "Louis"] def jsonAdapter = new Moshi.Builder().build().adapter(Types.newParameterizedType(List, String)) def input = jsonAdapter.toJson(names) - def output = names.collect {name -> "Hello $name" } + def output = names.collect { name -> "Hello $name" } def url = HttpUrl.get(address.resolve("/pfe-request")).newBuilder().build() def body = RequestBody.create(MediaType.get("application/json"), input) def request = new Request.Builder().url(url).method("PUT", body).build() @@ -149,9 +151,10 @@ class MuleForkedTest extends WithHttpServer { then: response.code() == 200 jsonAdapter.fromJson(response.body().string()) == output + assertTraces(1) { - trace(1 + names.size()) { traceAssert -> - traceAssert.span(0) { + trace(4 + 3 * names.size(), new TreeComparator(trace(0))) { traceAssert -> + span { operationName operation() resourceName "PUT /pfe-request" spanType DDSpanTypes.HTTP_SERVER @@ -165,13 +168,24 @@ class MuleForkedTest extends WithHttpServer { "$Tags.HTTP_USER_AGENT" String "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.HTTP_CLIENT_IP" "127.0.0.1" - "$Tags.PEER_PORT" { true } // is this really the best way to ignore tags? + "$Tags.PEER_PORT" { Integer } defaultTags() } } + def flowParent = muleSpan(traceAssert, "mule:flow", "MulePFETestFlow") + def foreachParent = muleSpan(traceAssert, "mule:parallel-foreach", "PFE", flowParent) + muleSpan(traceAssert, "mule:set-payload", "PFE Set Payload", flowParent) + def iterationParents = [] for (def pos = 1; pos <= names.size(); pos++) { - traceAssert.span(pos) { - childOf(span(0)) + iterationParents += muleSpan(traceAssert, "mule:parallel-foreach:iteration", "PFE", foreachParent) + } + def requestParents =[] + iterationParents.each { parent -> + requestParents += muleSpan(traceAssert, "http:request", "PFE Request", parent) + } + requestParents.each {parent -> + traceAssert.span { + childOf parent operationName "http.request" resourceName "GET /remote-pfe-request" spanType DDSpanTypes.HTTP_CLIENT @@ -191,6 +205,42 @@ class MuleForkedTest extends WithHttpServer { } } + /** + * Sorts the spans by level in the trace (how many parents). + * If in the same level, the one with lower parent it will come first. + */ + private static class TreeComparator implements Comparator { + private final Map levels + private final Map traceMap + + TreeComparator(List trace) { + traceMap = trace.collectEntries { [(it.spanId): it] } + levels = trace.collectEntries({ + [(it): walkUp(traceMap, it, 0)] + }) + } + + @Override + int compare(DDSpan o1, DDSpan o2) { + def len = levels[o1] <=> levels[o2] + // if they are not on the same tree level, take the one with shortest path to the root + if (len != 0) { + return len + } + if (o1.parentId == o2.parentId) { + return o1.spanId <=> o2.spanId + } + return compare(traceMap.get(o1.parentId), traceMap.get(o2.parentId)) + } + + def walkUp(Map traceMap, DDSpan span, int size) { + if (span.parentId == 0) { + return size + } + return walkUp(traceMap, traceMap.get(span.parentId), size + 1) + } + } + //test for v1 will be added once grizzly will support v1 naming @Override int version() { @@ -206,4 +256,5 @@ class MuleForkedTest extends WithHttpServer { String operation() { return "grizzly.request" } + } diff --git a/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleHttpServerForkedTest.groovy b/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleHttpServerForkedTest.groovy index 66330c7b6ac..bf80cb123e9 100644 --- a/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleHttpServerForkedTest.groovy +++ b/dd-java-agent/instrumentation/mule-4/src/test/groovy/mule4/MuleHttpServerForkedTest.groovy @@ -1,10 +1,11 @@ package mule4 +import static org.mule.runtime.api.util.MuleTestUtil.muleSpan + +import datadog.trace.agent.test.asserts.TraceAssert import datadog.trace.agent.test.base.HttpServerTest import spock.lang.Shared -import static mule4.MuleTestApplicationConstants.* - class MuleHttpServerForkedTest extends HttpServerTest { // TODO since mule uses reactor core, things sometime propagate to places where they're not closed @@ -26,11 +27,35 @@ class MuleHttpServerForkedTest extends HttpServerTest { return false } + @Override + boolean testNotFound() { + false + } + + @Override + void controllerSpan(TraceAssert trace, ServerEndpoint endpoint = null) { + def expectsError = endpoint == ServerEndpoint.EXCEPTION + def flowSpan = muleSpan(trace, "mule:flow", "MuleHttpServerTestFlow", null, expectsError) + muleSpan(trace, "java:new", "Create Handler", flowSpan) + muleSpan(trace, "java:invoke", "Handle Message", flowSpan, expectsError) + super.controllerSpan(trace, endpoint) + if (!expectsError) { + muleSpan(trace, "mule:set-variable", "Set Response Code", flowSpan) + muleSpan(trace, "mule:set-payload", "Set Response Body",flowSpan) + } else { + muleSpan(trace, "mule:on-error-propagate", "unknown",flowSpan) + } + } + + + @Override + int spanCount(ServerEndpoint endpoint) { + return super.spanCount(endpoint) + (endpoint == ServerEndpoint.EXCEPTION ? 4 : 5) + } + @Override protected void configurePreAgent() { super.configurePreAgent() - - injectSysConfig("integration.grizzly-filterchain.enabled", "true") injectSysConfig("integration.mule.enabled", "true") } @@ -63,14 +88,26 @@ class MuleHttpServerForkedTest extends HttpServerTest { // Force cast GStringImpl to String since Mule code does String casts of some properties appProperties.put((String) it.key, (String) it.value) } - def app = new URI("file:" + new File(String.valueOf(buildProperties.get(TEST_APPLICATION_JAR))).canonicalPath) + def app = new URI("file:" + new File(String.valueOf(buildProperties.get(MuleTestApplicationConstants.TEST_APPLICATION_JAR))).canonicalPath) container.deploy(app, appProperties) return container } @Override void stopServer(MuleTestContainer container) { - container.undeploy(String.valueOf(buildProperties.get(TEST_APPLICATION_NAME))) + container.undeploy(String.valueOf(buildProperties.get(MuleTestApplicationConstants.TEST_APPLICATION_NAME))) container.stop() } } + +/** + * This test wants to check that we built otel tracing (based on the sdk) does not interfere with our + */ +class MuleHttpServerOTELEnabledForkedTest extends MuleHttpServerForkedTest { + + @Override + MuleTestContainer startServer(int port) { + System.setProperty("mule.openTelemetry.tracer.exporter.enabled", "true") + return super.startServer(port) + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/HttpServerTestBridge.groovy b/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/HttpServerTestBridge.groovy index c2892382945..b0e6fa26578 100644 --- a/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/HttpServerTestBridge.groovy +++ b/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/HttpServerTestBridge.groovy @@ -13,7 +13,6 @@ import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint class HttpServerTestBridge { static Object[] testHandle(String requestPath) { ServerEndpoint endpoint = ServerEndpoint.forPath(requestPath) - if (endpoint == ServerEndpoint.EXCEPTION) { controller(endpoint) { throw new Exception(endpoint.body) diff --git a/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/MuleTestUtil.groovy b/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/MuleTestUtil.groovy new file mode 100644 index 00000000000..62f3e193e15 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/test/groovy/org/mule/runtime/api/util/MuleTestUtil.groovy @@ -0,0 +1,38 @@ +package org.mule.runtime.api.util + +import datadog.trace.agent.test.asserts.TraceAssert +import datadog.trace.api.DDSpanTypes +import datadog.trace.api.DDTags +import datadog.trace.bootstrap.instrumentation.api.Tags +import datadog.trace.core.DDSpan + +class MuleTestUtil { + static DDSpan muleSpan(TraceAssert traceAssert, String componentType, String componentName, DDSpan parent = null, boolean error = false) { + def ret + traceAssert.span { + ret = it.span + operationName "mule.action" + resourceName "$componentType $componentName" + if (parent != null) { + childOf parent + } else { + childOfPrevious() + } + errored error + spanType DDSpanTypes.MULE + tags { + "$Tags.COMPONENT" "mule" + "$Tags.SPAN_KIND" "$Tags.SPAN_KIND_INTERNAL" + "mule.location" { String } + "mule.correlation_id" { String } + if (error) { + "$DDTags.ERROR_TYPE" { String } + "$DDTags.ERROR_MSG" { String } + "$DDTags.ERROR_STACK" { String } + } + defaultTags() + } + } + ret + } +} diff --git a/dd-java-agent/instrumentation/mule-4/src/test/java/mule4/MuleTestContainer.java b/dd-java-agent/instrumentation/mule-4/src/test/java/mule4/MuleTestContainer.java index b42151ebd26..5b249d35759 100644 --- a/dd-java-agent/instrumentation/mule-4/src/test/java/mule4/MuleTestContainer.java +++ b/dd-java-agent/instrumentation/mule-4/src/test/java/mule4/MuleTestContainer.java @@ -7,7 +7,7 @@ import org.mule.runtime.api.exception.MuleException; import org.mule.runtime.api.util.MuleSystemProperties; import org.mule.runtime.core.api.config.MuleProperties; -import org.mule.runtime.module.launcher.MuleContainer; +import org.mule.runtime.module.launcher.DefaultMuleContainer; /** * A Mule test container where it is possible to deploy and undeploy mule applications. @@ -16,7 +16,7 @@ * mule directory. */ public class MuleTestContainer { - final MuleContainer container; + DefaultMuleContainer container; public MuleTestContainer(File muleBaseDirectory) throws IOException { if (!muleBaseDirectory.exists()) { @@ -28,6 +28,7 @@ public MuleTestContainer(File muleBaseDirectory) throws IOException { // This is the Mule runtime folder where files are stored System.setProperty(MuleProperties.MULE_BASE_DIRECTORY_PROPERTY, basePath); System.setProperty(MuleProperties.MULE_HOME_DIRECTORY_PROPERTY, basePath); + System.setProperty("mule.classloader.container.jpmsModuleLayer", "false"); // Mule is a bit picky with some directories existing, so let's create them for (String dirName : new String[] {"domains/default", "apps"}) { File dir = new File(muleBaseDirectory, dirName); @@ -35,7 +36,19 @@ public MuleTestContainer(File muleBaseDirectory) throws IOException { dir.mkdirs(); } } - this.container = new MuleContainer(new String[0]); + try { + this.container = DefaultMuleContainer.class.newInstance(); + } catch (Throwable t) { + t.printStackTrace(); + try { + this.container = + DefaultMuleContainer.class + .getDeclaredConstructor(String[].class) + .newInstance((Object) new String[0]); + } catch (Throwable t2) { + throw new RuntimeException("Unable to instantiate MuleContainer", t2); + } + } } public void start() throws MuleException { @@ -50,7 +63,7 @@ public void undeploy(String appName) { container.getDeploymentService().undeploy(appName); } - public void stop() throws MuleException { + public void stop() throws Exception { container.shutdown(); } } diff --git a/dd-java-agent/instrumentation/mule-4/src/test/resources/log4j2.xml b/dd-java-agent/instrumentation/mule-4/src/test/resources/log4j2.xml new file mode 100644 index 00000000000..d2ec675c2d1 --- /dev/null +++ b/dd-java-agent/instrumentation/mule-4/src/test/resources/log4j2.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/ListWriterAssert.groovy b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/ListWriterAssert.groovy index c89f7f5da9c..166eb92f6b6 100644 --- a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/ListWriterAssert.groovy +++ b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/ListWriterAssert.groovy @@ -1,5 +1,7 @@ package datadog.trace.agent.test.asserts +import static TraceAssert.assertTrace + import datadog.trace.common.writer.ListWriter import datadog.trace.core.DDSpan import groovy.transform.stc.ClosureParams @@ -11,8 +13,6 @@ import org.spockframework.runtime.model.TextPosition import java.util.concurrent.atomic.AtomicInteger -import static TraceAssert.assertTrace - class ListWriterAssert { public static final Comparator> SORT_TRACES_BY_ID = new SortTracesById() public static final Comparator> SORT_TRACES_BY_START = new SortTracesByStart() @@ -108,8 +108,13 @@ class ListWriterAssert { @DelegatesTo(value = TraceAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) { trace(expectedSize, false, spec) } - void trace(int expectedSize, boolean sortByName, + @ClosureParams(value = SimpleType, options = ['datadog.trace.agent.test.asserts.TraceAssert']) + @DelegatesTo(value = TraceAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) { + trace(expectedSize, sortByName ? TraceAssert.NAME_COMPARATOR : null, spec) + } + + void trace(int expectedSize, Comparator sorter, @ClosureParams(value = SimpleType, options = ['datadog.trace.agent.test.asserts.TraceAssert']) @DelegatesTo(value = TraceAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) { def index = traceAssertCount.getAndIncrement() @@ -121,7 +126,7 @@ class ListWriterAssert { throw new ConcurrentModificationException("ListWriter modified during assertion") } assertedIndexes.add(index) - assertTrace(trace(index), expectedSize, sortByName, spec) + assertTrace(trace(index), expectedSize, sorter, spec) } void assertTracesAllVerified() { diff --git a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/TraceAssert.groovy b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/TraceAssert.groovy index cb43d5af702..e82262b95fd 100644 --- a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/TraceAssert.groovy +++ b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/asserts/TraceAssert.groovy @@ -19,7 +19,7 @@ class TraceAssert { size = trace.size() } - private static final NAME_COMPARATOR = new Comparator() { + static final NAME_COMPARATOR = new Comparator() { @Override int compare(DDSpan o1, DDSpan o2) { int compare = o1.spanName.toString() <=> o2.spanName.toString() @@ -30,18 +30,18 @@ class TraceAssert { static void assertTrace(List trace, int expectedSize, @ClosureParams(value = SimpleType, options = ['datadog.trace.agent.test.asserts.TraceAssert']) @DelegatesTo(value = TraceAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) { - assertTrace(trace, expectedSize, false, spec) + assertTrace(trace, expectedSize, null, spec) } - static void assertTrace(List trace, int expectedSize, boolean sortByName, + static void assertTrace(List trace, int expectedSize, Comparator sorter, @ClosureParams(value = SimpleType, options = ['datadog.trace.agent.test.asserts.TraceAssert']) @DelegatesTo(value = TraceAssert, strategy = Closure.DELEGATE_FIRST) Closure spec) { // Some tests do their own sorting of the spans which can happen concurrently with other code doing // iterations, so we make a copy of the list here to not cause a ConcurrentModificationException trace = new ArrayList(trace) assert trace.size() == expectedSize - if (sortByName) { - Collections.sort(trace, NAME_COMPARATOR) + if (sorter != null) { + Collections.sort(trace, sorter) } def asserter = new TraceAssert(trace) def clone = (Closure) spec.clone() diff --git a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy index 22d8dd0028e..2c2784ec889 100644 --- a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy +++ b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy @@ -97,7 +97,11 @@ abstract class HttpServerTest extends WithHttpServer { return key + ":" + value } static { - ((ch.qos.logback.classic.Logger) SERVER_LOGGER).setLevel(Level.DEBUG) + try { + ((ch.qos.logback.classic.Logger) SERVER_LOGGER).setLevel(Level.DEBUG) + } catch (Throwable t) { + SERVER_LOGGER.warn("Unable to set debug level for server logger", t) + } } @Override diff --git a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/OkHttpUtils.java b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/OkHttpUtils.java index 115b0524bc5..361aab3845c 100644 --- a/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/OkHttpUtils.java +++ b/dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/OkHttpUtils.java @@ -28,7 +28,11 @@ public class OkHttpUtils { private static final Logger CLIENT_LOGGER = LoggerFactory.getLogger("http-client"); static { - ((ch.qos.logback.classic.Logger) CLIENT_LOGGER).setLevel(ch.qos.logback.classic.Level.DEBUG); + try { + ((ch.qos.logback.classic.Logger) CLIENT_LOGGER).setLevel(ch.qos.logback.classic.Level.DEBUG); + } catch (Throwable t) { + CLIENT_LOGGER.warn("Unable to set debug level to client logger", t); + } } private static final HttpLoggingInterceptor LOGGING_INTERCEPTOR = diff --git a/dd-trace-api/src/main/java/datadog/trace/api/DDSpanTypes.java b/dd-trace-api/src/main/java/datadog/trace/api/DDSpanTypes.java index d8cbdad6048..908421d8538 100644 --- a/dd-trace-api/src/main/java/datadog/trace/api/DDSpanTypes.java +++ b/dd-trace-api/src/main/java/datadog/trace/api/DDSpanTypes.java @@ -34,4 +34,6 @@ public class DDSpanTypes { public static final String VULNERABILITY = "vulnerability"; public static final String PROTOBUF = "protobuf"; + + public static final String MULE = "mule"; } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a364186fdc8..0fef6ba4664 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -75,6 +75,8 @@ byte-buddy-agent = { module = "net.bytebuddy:byte-buddy-agent", version.ref = "b testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" } logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } +logback-core = { module = "ch.qos.logback:logback-core", version.ref = "logback" } + log4j-over-slf4j = { module = "org.slf4j:log4j-over-slf4j", version.ref = "slf4j" } jcl-over-slf4j = { module = "org.slf4j:jcl-over-slf4j", version.ref = "slf4j" } jul-to-slf4j = { module = "org.slf4j:jul-to-slf4j", version.ref = "slf4j" } diff --git a/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InstrumentationTags.java b/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InstrumentationTags.java index 430f74924da..f21559fcbf4 100644 --- a/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InstrumentationTags.java +++ b/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InstrumentationTags.java @@ -116,4 +116,7 @@ public class InstrumentationTags { public static final String TIBCO_NODE = "tibco.node"; public static final String TIBCO_VERSION = "tibco.version"; + + public static final String MULE_CORRELATION_ID = "mule.correlation_id"; + public static final String MULE_LOCATION = "mule.location"; } diff --git a/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InternalSpanTypes.java b/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InternalSpanTypes.java index 1bbc8931471..38944151d45 100644 --- a/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InternalSpanTypes.java +++ b/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/InternalSpanTypes.java @@ -47,4 +47,5 @@ public class InternalSpanTypes { public static final UTF8BytesString PROTOBUF = UTF8BytesString.create(DDSpanTypes.PROTOBUF); public static final UTF8BytesString TIBCO_BW = UTF8BytesString.create("tibco_bw"); + public static final UTF8BytesString MULE = UTF8BytesString.create(DDSpanTypes.MULE); }