From 94550e3ab19803ec00aff1d84c161c50dc5b458f Mon Sep 17 00:00:00 2001 From: Andrea Marziali Date: Wed, 21 May 2025 13:53:26 +0200 Subject: [PATCH 1/2] Support WithSpan inheritContext attribute --- .../build.gradle | 6 +- .../gradle.lockfile | 164 ---------- .../groovy/SpanAttributeAnnotationTest.groovy | 44 +++ .../groovy/WithSpanAnnotationTest.groovy | 303 ++++++++++++++++++ .../java/annotatedsample/TracedMethods.java | 150 +++++++++ .../annotations/WithSpanDecorator.java | 32 +- 6 files changed, 531 insertions(+), 168 deletions(-) delete mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile create mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy create mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy create mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle index 56de3e48182..08fef16205e 100644 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle @@ -10,7 +10,8 @@ muzzle { apply from: "$rootDir/gradle/java.gradle" -addTestSuiteForDir('latestDepTest', 'test') +addTestSuite('latestDepTest') +addTestSuiteForDir('latest1xDepTest', 'test') dependencies { compileOnly group: 'io.opentelemetry', name: 'opentelemetry-api', version: openTelemetryVersion @@ -19,5 +20,6 @@ dependencies { testImplementation group: 'io.opentelemetry', name: 'opentelemetry-api', version: openTelemetryVersion testImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: openTelemetryVersion - latestDepTestImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '1+' + latest1xDepTestImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '1+' + latestDepTestImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '+' } diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile deleted file mode 100644 index 60895868ed7..00000000000 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile +++ /dev/null @@ -1,164 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -cafe.cryptography:curve25519-elisabeth:0.1.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -cafe.cryptography:ed25519-elisabeth:0.1.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -ch.qos.logback:logback-classic:1.2.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -ch.qos.logback:logback-core:1.2.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.beust:jcommander:1.78=latestDepTestRuntimeClasspath,testRuntimeClasspath -com.blogspot.mydailyjava:weak-lock-free:0.17=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.datadoghq.okhttp3:okhttp:3.12.15=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.datadoghq.okio:okio:1.17.6=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.datadoghq:java-dogstatsd-client:4.4.3=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.datadoghq:sketches-java:0.8.3=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.javaparser:javaparser-core:3.25.1=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.jnr:jffi:1.3.13=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-a64asm:1.0.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-constants:0.10.4=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-enxio:0.32.17=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-ffi:2.2.16=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-posix:3.1.19=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-unixsocket:0.38.22=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-x86asm:1.0.2=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.github.spotbugs:spotbugs-annotations:4.2.0=compileClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.spotbugs:spotbugs-annotations:4.7.3=spotbugs -com.github.spotbugs:spotbugs:4.7.3=spotbugs -com.github.stefanbirkner:system-rules:1.19.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.auto.service:auto-service-annotations:1.0-rc7=annotationProcessor,compileClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,testAnnotationProcessor,testCompileClasspath -com.google.auto.service:auto-service:1.0-rc7=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.6.6=compileClasspath -com.google.auto:auto-common:0.10=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.9.1=spotbugs -com.google.errorprone:error_prone_annotations:2.2.0=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.1=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.guava:guava:20.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:27.0.1-jre=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.j2objc:j2objc-annotations:1.1=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.re2j:re2j:1.7=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -com.squareup.moshi:moshi:1.11.0=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.squareup.okhttp3:logging-interceptor:3.12.12=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.squareup.okhttp3:okhttp:3.12.12=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -com.squareup.okio:okio:1.17.5=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.thoughtworks.qdox:qdox:1.12.1=latestDepTestRuntimeClasspath,testRuntimeClasspath -commons-codec:commons-codec:1.15=spotbugs -commons-fileupload:commons-fileupload:1.5=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -commons-io:commons-io:2.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -de.thetaphi:forbiddenapis:3.8=compileClasspath -info.picocli:picocli:4.6.3=latestDepTestRuntimeClasspath,testRuntimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:1.33.6=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath -io.opentelemetry:opentelemetry-api:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -io.opentelemetry:opentelemetry-api:1.41.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath -io.opentelemetry:opentelemetry-context:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath -io.opentelemetry:opentelemetry-context:1.41.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath -io.sqreen:libsqreen:13.0.1=latestDepTestRuntimeClasspath,testRuntimeClasspath -javax.servlet:javax.servlet-api:3.1.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -jaxen:jaxen:1.2.0=spotbugs -jline:jline:2.14.6=latestDepTestRuntimeClasspath,testRuntimeClasspath -junit:junit-dep:4.11=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -junit:junit:4.13.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -net.bytebuddy:byte-buddy-agent:1.15.11=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -net.bytebuddy:byte-buddy:1.15.11=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -net.java.dev.jna:jna-platform:5.8.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -net.java.dev.jna:jna:5.8.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -net.jcip:jcip-annotations:1.0=compileClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:11.4=spotbugs -org.apache.ant:ant-antlr:1.10.12=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.apache.ant:ant-antlr:1.9.15=codenarc -org.apache.ant:ant-junit:1.10.12=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.apache.ant:ant-junit:1.9.15=codenarc -org.apache.ant:ant-launcher:1.10.12=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.apache.ant:ant:1.10.12=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.apache.bcel:bcel:6.5.0=spotbugs -org.apache.commons:commons-lang3:3.12.0=spotbugs -org.apache.commons:commons-text:1.10.0=spotbugs -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.logging.log4j:log4j-api:2.19.0=spotbugs -org.apache.logging.log4j:log4j-core:2.19.0=spotbugs -org.apiguardian:apiguardian-api:1.1.2=latestDepTestCompileClasspath,testCompileClasspath -org.checkerframework:checker-qual:2.5.2=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -org.codehaus.groovy:groovy-all:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-ant:2.5.14=codenarc -org.codehaus.groovy:groovy-ant:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-astbuilder:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-cli-picocli:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-console:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-datetime:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-docgenerator:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-groovydoc:2.5.14=codenarc -org.codehaus.groovy:groovy-groovydoc:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-groovysh:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-jmx:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-json:2.5.14=codenarc -org.codehaus.groovy:groovy-json:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-jsr223:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-macro:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-nio:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-servlet:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-sql:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-swing:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-templates:2.5.14=codenarc -org.codehaus.groovy:groovy-templates:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-test-junit5:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-test:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-testng:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy-xml:2.5.14=codenarc -org.codehaus.groovy:groovy-xml:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy:2.5.14=codenarc -org.codehaus.groovy:groovy:3.0.17=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.mojo:animal-sniffer-annotations:1.17=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -org.codenarc:CodeNarc:2.2.0=codenarc -org.dom4j:dom4j:2.1.3=spotbugs -org.eclipse.jetty:jetty-http:9.4.56.v20240826=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-io:9.4.56.v20240826=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-server:9.4.56.v20240826=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util:9.4.56.v20240826=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.gmetrics:GMetrics:1.1=codenarc -org.hamcrest:hamcrest-core:1.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hamcrest:hamcrest:2.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jctools:jctools-core:3.3.0=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.9.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:5.9.2=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:1.9.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:1.9.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-launcher:1.9.2=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-runner:1.9.2=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-suite-api:1.9.2=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-suite-commons:1.9.2=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.junit:junit-bom:5.9.1=spotbugs -org.junit:junit-bom:5.9.2=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.objenesis:objenesis:3.3=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.opentest4j:opentest4j:1.2.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.2=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.4=spotbugs -org.ow2.asm:asm-commons:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath -org.ow2.asm:asm-commons:9.4=spotbugs -org.ow2.asm:asm-commons:9.8=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-tree:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath -org.ow2.asm:asm-tree:9.4=spotbugs -org.ow2.asm:asm-tree:9.8=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-util:9.2=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-util:9.4=spotbugs -org.ow2.asm:asm:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath -org.ow2.asm:asm:9.4=spotbugs -org.ow2.asm:asm:9.8=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.slf4j:jcl-over-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.slf4j:jul-to-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.slf4j:log4j-over-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.slf4j:slf4j-api:1.7.30=compileClasspath,instrumentPluginClasspath,latestDepTestCompileClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath -org.slf4j:slf4j-api:1.7.32=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.slf4j:slf4j-api:2.0.0=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.0=spotbugsSlf4j -org.spockframework:spock-core:2.3-groovy-3.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.spockframework:spock-junit4:2.3-groovy-3.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.testng:testng:7.5=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.webjars:jquery:3.5.1=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.xmlresolver:xmlresolver:4.4.3=spotbugs -org.yaml:snakeyaml:2.4=instrumentPluginClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath -xml-apis:xml-apis:1.4.01=spotbugs -empty=spotbugsPlugins diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy new file mode 100644 index 00000000000..48e1d32b329 --- /dev/null +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy @@ -0,0 +1,44 @@ +import annotatedsample.TracedMethods +import datadog.trace.agent.test.AgentTestRunner +import datadog.trace.bootstrap.instrumentation.api.Tags + +class SpanAttributeAnnotationTest extends AgentTestRunner { + @Override + void configurePreAgent() { + super.configurePreAgent() + + injectSysConfig("dd.integration.opentelemetry-annotations-1.20.enabled", "true") + } + + def "test SpanAttribute annotated #type parameter"() { + setup: + def methodName = "sayHelloWith${typeName}Attribute" + TracedMethods."$methodName"(value) + + expect: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.$methodName" + operationName "TracedMethods.$methodName" + parent() + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + "custom-tag" value + } + } + } + } + + where: + type | value + 'String' | 'value' + 'int' | 12 + 'long' | 23456L + 'list' | ['value1', 'value2', 'value3'] + typeName = type.substring(0, 1).toUpperCase() + type.substring(1) + } +} + diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy new file mode 100644 index 00000000000..14e68c4abf2 --- /dev/null +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy @@ -0,0 +1,303 @@ +import annotatedsample.TracedMethods +import datadog.trace.agent.test.AgentTestRunner +import datadog.trace.api.DDSpanTypes +import datadog.trace.bootstrap.instrumentation.api.Tags + +import java.util.concurrent.CountDownLatch + +import static datadog.trace.agent.test.utils.TraceUtils.basicSpan +import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace + +class WithSpanAnnotationTest extends AgentTestRunner { + @Override + void configurePreAgent() { + super.configurePreAgent() + + injectSysConfig("dd.integration.opentelemetry-annotations-1.20.enabled", "true") + injectSysConfig("dd.measure.methods", "${TracedMethods.name}[sayHelloMeasured]") + } + + def "test WithSpan annotated method"() { + setup: + TracedMethods.sayHello() + + expect: + assertTraces(1) { + trace(1) { + span { + serviceName "custom-service-name" + resourceName "TracedMethods.sayHello" + operationName "TracedMethods.sayHello" + parent() + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated method with custom value"() { + setup: + TracedMethods.sayHelloWithCustomOperationName() + + expect: + assertTraces(1) { + trace(1) { + span { + serviceName "custom-service-name" + resourceName "custom-operation-name" + operationName "custom-operation-name" + parent() + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated method with #kind kind"() { + setup: + def methodName = "sayHelloWith${kindName}Kind" + TracedMethods."$methodName"() + + expect: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.${methodName}" + operationName "TracedMethods.${methodName}" + parent() + spanType(type) + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + + where: + kind | type + 'SERVER' | DDSpanTypes.HTTP_SERVER + 'CLIENT' | DDSpanTypes.HTTP_CLIENT + 'PRODUCER' | DDSpanTypes.MESSAGE_PRODUCER + 'CONSUMER' | DDSpanTypes.MESSAGE_CONSUMER + 'INTERNAL' | null + kindName = kind.substring(0, 1) + kind.substring(1).toLowerCase() + } + + def "test WithSpan annotated method throwing exception"() { + setup: + Throwable error = null + try { + TracedMethods.throwException() + } catch (final Throwable ex) { + error = ex + } + + expect: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.throwException" + operationName "TracedMethods.throwException" + errored true + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + errorTags(error.class, error.getMessage()) + } + } + } + } + } + + def "test WithSpan annotated anonymous inner method"() { + setup: + TracedMethods.traceAnonymousInnerClass() + + expect: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods\$1.call" + operationName "TracedMethods\$1.call" + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated async method (CompletableFuture)"() { + setup: + def latch = new CountDownLatch(1) + def completableFuture = TracedMethods.traceAsyncCompletableFuture(latch) + + expect: + TEST_WRITER.size() == 0 + + when: + latch.countDown() + completableFuture.join() + + then: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.traceAsyncCompletableFuture" + operationName "TracedMethods.traceAsyncCompletableFuture" + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated async method (failing CompletableFuture)"() { + setup: + def latch = new CountDownLatch(1) + def expectedException = new RuntimeException("Test exception") + def completableFuture = TracedMethods.traceAsyncFailingCompletableFuture(latch, expectedException) + + expect: + TEST_WRITER.size() == 0 + + when: + latch.countDown() + completableFuture.join() + + then: + thrown(RuntimeException) + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.traceAsyncFailingCompletableFuture" + operationName "TracedMethods.traceAsyncFailingCompletableFuture" + errored true + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + errorTags(expectedException) + } + } + } + } + } + + def "test WithSpan annotated async method (CompletionStage)"() { + setup: + def latch = new CountDownLatch(1) + def completionStage = TracedMethods.traceAsyncCompletionStage(latch) + + expect: + TEST_WRITER.size() == 0 + + when: + latch.countDown() + completionStage.toCompletableFuture().join() + + then: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.traceAsyncCompletionStage" + operationName "TracedMethods.traceAsyncCompletionStage" + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated async method (failing CompletionStage)"() { + setup: + def latch = new CountDownLatch(1) + def expectedException = new RuntimeException("Test exception") + def completionStage = TracedMethods.traceAsyncFailingCompletionStage(latch, expectedException) + + expect: + TEST_WRITER.size() == 0 + + when: + latch.countDown() + completionStage.toCompletableFuture().join() + + then: + thrown(RuntimeException) + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.traceAsyncFailingCompletionStage" + operationName "TracedMethods.traceAsyncFailingCompletionStage" + errored true + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + errorTags(expectedException) + } + } + } + } + } + + def "test WithSpan annotated measured method"() { + setup: + TracedMethods.sayHelloMeasured() + + expect: + assertTraces(1) { + trace(1) { + span { + resourceName "TracedMethods.sayHelloMeasured" + operationName "TracedMethods.sayHelloMeasured" + parent() + errored false + measured true + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } + + def "test WithSpan annotated method inheritContext=false"() { + setup: + runUnderTrace("parent") { + TracedMethods.sayHelloWithInANewTrace() + } + expect: + assertTraces(2) { + trace(1) { + basicSpan(it, "parent") + } + trace(1) { + span { + resourceName "TracedMethods.sayHelloWithInANewTrace" + operationName "TracedMethods.sayHelloWithInANewTrace" + parent() + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } +} diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java new file mode 100644 index 00000000000..356631d526f --- /dev/null +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java @@ -0,0 +1,150 @@ +package annotatedsample; + +import static datadog.trace.api.DDTags.SERVICE_NAME; +import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activeSpan; +import static io.opentelemetry.api.trace.SpanKind.CLIENT; +import static io.opentelemetry.api.trace.SpanKind.CONSUMER; +import static io.opentelemetry.api.trace.SpanKind.INTERNAL; +import static io.opentelemetry.api.trace.SpanKind.PRODUCER; +import static io.opentelemetry.api.trace.SpanKind.SERVER; +import static java.util.concurrent.TimeUnit.SECONDS; + +import io.opentelemetry.instrumentation.annotations.SpanAttribute; +import io.opentelemetry.instrumentation.annotations.WithSpan; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CountDownLatch; + +public class TracedMethods { + @WithSpan + public static String sayHello() { + activeSpan().setTag(SERVICE_NAME, "custom-service-name"); + return "hello!"; + } + + @WithSpan(value = "custom-operation-name") + public static String sayHelloWithCustomOperationName() { + activeSpan().setTag(SERVICE_NAME, "custom-service-name"); + return "hello!"; + } + + @WithSpan(kind = SERVER) + public static String sayHelloWithServerKind() { + return "hello!"; + } + + @WithSpan(kind = CLIENT) + public static String sayHelloWithClientKind() { + return "hello!"; + } + + @WithSpan(kind = PRODUCER) + public static String sayHelloWithProducerKind() { + return "hello!"; + } + + @WithSpan(kind = CONSUMER) + public static String sayHelloWithConsumerKind() { + return "hello!"; + } + + @WithSpan(kind = INTERNAL) + public static String sayHelloWithInternalKind() { + return "hello!"; + } + + @WithSpan(inheritContext = false) + public static String sayHelloWithInANewTrace() { + return "hello!"; + } + + @WithSpan + public static String sayHelloWithStringAttribute(@SpanAttribute("custom-tag") String param) { + return "hello!"; + } + + @WithSpan + public static String sayHelloWithIntAttribute(@SpanAttribute("custom-tag") int param) { + return "hello!"; + } + + @WithSpan + public static String sayHelloWithLongAttribute(@SpanAttribute("custom-tag") long param) { + return "hello!"; + } + + @WithSpan + public static String sayHelloWithListAttribute(@SpanAttribute("custom-tag") List param) { + return "hello!"; + } + + @WithSpan + public static void throwException() { + throw new RuntimeException("Some exception"); + } + + public static String traceAnonymousInnerClass() { + return new Callable() { + @WithSpan + @Override + public String call() { + return "hello!"; + } + }.call(); + } + + @WithSpan + public static CompletableFuture traceAsyncCompletableFuture(CountDownLatch latch) { + return CompletableFuture.supplyAsync( + () -> { + await(latch); + return "hello!"; + }); + } + + @WithSpan + public static CompletableFuture traceAsyncFailingCompletableFuture( + CountDownLatch latch, RuntimeException exception) { + return CompletableFuture.supplyAsync( + () -> { + await(latch); + throw exception; + }); + } + + @WithSpan + public static CompletionStage traceAsyncCompletionStage(CountDownLatch latch) { + return CompletableFuture.supplyAsync( + () -> { + await(latch); + return "hello!"; + }); + } + + @WithSpan + public static CompletionStage traceAsyncFailingCompletionStage( + CountDownLatch latch, RuntimeException exception) { + return CompletableFuture.supplyAsync( + () -> { + await(latch); + throw exception; + }); + } + + @WithSpan + public static String sayHelloMeasured() { + return "hello!"; + } + + private static void await(CountDownLatch latch) { + try { + if (!latch.await(5, SECONDS)) { + throw new IllegalStateException("Latch still locked"); + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } +} diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/main/java/datadog/trace/instrumentation/opentelemetry/annotations/WithSpanDecorator.java b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/main/java/datadog/trace/instrumentation/opentelemetry/annotations/WithSpanDecorator.java index 782d0719c9f..6e81166bdea 100644 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/main/java/datadog/trace/instrumentation/opentelemetry/annotations/WithSpanDecorator.java +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/main/java/datadog/trace/instrumentation/opentelemetry/annotations/WithSpanDecorator.java @@ -4,16 +4,19 @@ import static datadog.trace.api.DDSpanTypes.HTTP_SERVER; import static datadog.trace.api.DDSpanTypes.MESSAGE_CONSUMER; import static datadog.trace.api.DDSpanTypes.MESSAGE_PRODUCER; -import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.startSpan; import static java.lang.Math.min; import datadog.trace.api.InstrumenterConfig; import datadog.trace.bootstrap.instrumentation.api.AgentSpan; +import datadog.trace.bootstrap.instrumentation.api.AgentTracer; import datadog.trace.bootstrap.instrumentation.api.UTF8BytesString; import datadog.trace.bootstrap.instrumentation.decorator.AsyncResultDecorator; +import datadog.trace.util.MethodHandles; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.instrumentation.annotations.SpanAttribute; import io.opentelemetry.instrumentation.annotations.WithSpan; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.lang.reflect.Parameter; @@ -21,6 +24,18 @@ public class WithSpanDecorator extends AsyncResultDecorator { public static final WithSpanDecorator DECORATE = new WithSpanDecorator(); private static final String INSTRUMENTATION_NAME = "opentelemetry-annotations"; private static final CharSequence OPENTELEMETRY = UTF8BytesString.create("opentelemetry"); + private static final MethodHandle INHERIT_CONTEXT_MH = maybeGetInheritContextHandle(); + + private static MethodHandle maybeGetInheritContextHandle() { + try { + return new MethodHandles(WithSpan.class.getClassLoader()) + .method(WithSpan.class, "inheritContext") + .asType(MethodType.methodType(boolean.class, WithSpan.class)); + } catch (Throwable ignored) { + // not available before 2.14.0 + } + return null; + } @Override protected String[] instrumentationNames() { @@ -40,18 +55,31 @@ protected CharSequence component() { public AgentSpan startMethodSpan(Method method) { CharSequence operationName = null; CharSequence spanType = null; + boolean inheritContext = true; WithSpan withSpanAnnotation = method.getAnnotation(WithSpan.class); if (withSpanAnnotation != null) { operationName = withSpanAnnotation.value(); spanType = convertToSpanType(withSpanAnnotation.kind()); + if (INHERIT_CONTEXT_MH != null) { + try { + inheritContext = (boolean) INHERIT_CONTEXT_MH.invokeExact(withSpanAnnotation); + } catch (Throwable ignored) { + } + } } if (operationName == null || operationName.length() == 0) { operationName = DECORATE.spanNameForMethod(method); } - AgentSpan span = startSpan(INSTRUMENTATION_NAME, operationName); + AgentTracer.SpanBuilder spanBuilder = + AgentTracer.get().buildSpan(INSTRUMENTATION_NAME, operationName); + + if (!inheritContext) { + spanBuilder = spanBuilder.ignoreActiveSpan(); + } + final AgentSpan span = spanBuilder.start(); DECORATE.afterStart(span); if (spanType != null) { From 2c87c91fbf6777d4319c0253f406dedc5b0dd9c5 Mon Sep 17 00:00:00 2001 From: Andrea Marziali Date: Thu, 22 May 2025 10:03:25 +0200 Subject: [PATCH 2/2] Factorize tests and add gradle lock --- .../build.gradle | 1 + .../gradle.lockfile | 169 ++++++++++ .../groovy/SpanAttributeAnnotationTest.groovy | 44 --- .../WithSpanAnnotationLatestDepTest.groovy | 33 ++ .../groovy/WithSpanAnnotationTest.groovy | 303 ------------------ .../{ => latest}/TracedMethods.java | 2 +- 6 files changed, 204 insertions(+), 348 deletions(-) create mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile delete mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy create mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationLatestDepTest.groovy delete mode 100644 dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy rename dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/{ => latest}/TracedMethods.java (99%) diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle index 08fef16205e..0d8d3d01ac6 100644 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/build.gradle @@ -22,4 +22,5 @@ dependencies { testImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: openTelemetryVersion latest1xDepTestImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '1+' latestDepTestImplementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '+' + latestDepTestImplementation sourceSets.test.output } diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile new file mode 100644 index 00000000000..361cd2b4d13 --- /dev/null +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/gradle.lockfile @@ -0,0 +1,169 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +cafe.cryptography:curve25519-elisabeth:0.1.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +cafe.cryptography:ed25519-elisabeth:0.1.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +ch.qos.logback:logback-classic:1.2.3=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +ch.qos.logback:logback-core:1.2.3=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.beust:jcommander:1.78=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +com.blogspot.mydailyjava:weak-lock-free:0.17=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.datadoghq.okhttp3:okhttp:3.12.15=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.datadoghq.okio:okio:1.17.6=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.datadoghq:java-dogstatsd-client:4.4.3=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.datadoghq:sketches-java:0.8.3=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.javaparser:javaparser-core:3.25.1=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.jnr:jffi:1.3.13=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-a64asm:1.0.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-constants:0.10.4=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-enxio:0.32.17=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-ffi:2.2.16=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-posix:3.1.19=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-unixsocket:0.38.22=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-x86asm:1.0.2=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.github.spotbugs:spotbugs-annotations:4.2.0=compileClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.spotbugs:spotbugs-annotations:4.7.3=spotbugs +com.github.spotbugs:spotbugs:4.7.3=spotbugs +com.github.stefanbirkner:system-rules:1.19.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.google.auto.service:auto-service-annotations:1.0-rc7=annotationProcessor,compileClasspath,latest1xDepTestAnnotationProcessor,latest1xDepTestCompileClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,testAnnotationProcessor,testCompileClasspath +com.google.auto.service:auto-service:1.0-rc7=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.auto.value:auto-value-annotations:1.6.6=compileClasspath +com.google.auto:auto-common:0.10=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,latest1xDepTestAnnotationProcessor,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath +com.google.code.gson:gson:2.9.1=spotbugs +com.google.errorprone:error_prone_annotations:2.2.0=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.guava:failureaccess:1.0.1=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.guava:guava:20.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.google.guava:guava:27.0.1-jre=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.j2objc:j2objc-annotations:1.1=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.re2j:re2j:1.7=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +com.squareup.moshi:moshi:1.11.0=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.squareup.okhttp3:logging-interceptor:3.12.12=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.squareup.okhttp3:okhttp:3.12.12=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +com.squareup.okio:okio:1.17.5=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.thoughtworks.qdox:qdox:1.12.1=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.15=spotbugs +commons-fileupload:commons-fileupload:1.5=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +commons-io:commons-io:2.11.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +de.thetaphi:forbiddenapis:3.8=compileClasspath +info.picocli:picocli:4.6.3=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:1.33.6=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.16.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +io.opentelemetry:opentelemetry-api:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-api:1.41.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath +io.opentelemetry:opentelemetry-api:1.50.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +io.opentelemetry:opentelemetry-context:1.20.0=compileClasspath,testCompileClasspath,testRuntimeClasspath +io.opentelemetry:opentelemetry-context:1.41.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath +io.opentelemetry:opentelemetry-context:1.50.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +io.sqreen:libsqreen:13.0.1=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +javax.servlet:javax.servlet-api:3.1.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +jaxen:jaxen:1.2.0=spotbugs +jline:jline:2.14.6=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +junit:junit-dep:4.11=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +junit:junit:4.13.2=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +net.bytebuddy:byte-buddy-agent:1.17.5=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +net.bytebuddy:byte-buddy:1.17.5=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +net.java.dev.jna:jna-platform:5.8.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +net.java.dev.jna:jna:5.8.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +net.jcip:jcip-annotations:1.0=compileClasspath,latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath +net.sf.saxon:Saxon-HE:11.4=spotbugs +org.apache.ant:ant-antlr:1.10.12=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.apache.ant:ant-antlr:1.9.15=codenarc +org.apache.ant:ant-junit:1.10.12=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.apache.ant:ant-junit:1.9.15=codenarc +org.apache.ant:ant-launcher:1.10.12=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.apache.ant:ant:1.10.12=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.bcel:bcel:6.5.0=spotbugs +org.apache.commons:commons-lang3:3.12.0=spotbugs +org.apache.commons:commons-text:1.10.0=spotbugs +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.logging.log4j:log4j-api:2.19.0=spotbugs +org.apache.logging.log4j:log4j-core:2.19.0=spotbugs +org.apiguardian:apiguardian-api:1.1.2=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.checkerframework:checker-qual:2.5.2=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +org.codehaus.groovy:groovy-all:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-ant:2.5.14=codenarc +org.codehaus.groovy:groovy-ant:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-astbuilder:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-cli-picocli:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-console:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-datetime:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-docgenerator:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-groovydoc:2.5.14=codenarc +org.codehaus.groovy:groovy-groovydoc:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-groovysh:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-jmx:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-json:2.5.14=codenarc +org.codehaus.groovy:groovy-json:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-jsr223:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-macro:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-nio:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-servlet:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-sql:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-swing:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-templates:2.5.14=codenarc +org.codehaus.groovy:groovy-templates:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-test-junit5:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-test:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-testng:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy-xml:2.5.14=codenarc +org.codehaus.groovy:groovy-xml:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.groovy:groovy:2.5.14=codenarc +org.codehaus.groovy:groovy:3.0.17=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.mojo:animal-sniffer-annotations:1.17=annotationProcessor,latest1xDepTestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +org.codenarc:CodeNarc:2.2.0=codenarc +org.dom4j:dom4j:2.1.3=spotbugs +org.eclipse.jetty:jetty-http:9.4.56.v20240826=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-io:9.4.56.v20240826=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-server:9.4.56.v20240826=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util:9.4.56.v20240826=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.gmetrics:GMetrics:1.1=codenarc +org.hamcrest:hamcrest-core:1.3=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hamcrest:hamcrest:2.2=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.jctools:jctools-core:3.3.0=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:5.9.2=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:5.9.2=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-commons:1.9.0=latest1xDepTestCompileClasspath,latestDepTestCompileClasspath,testCompileClasspath +org.junit.platform:junit-platform-commons:1.9.2=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-engine:1.9.0=latest1xDepTestCompileClasspath,latestDepTestCompileClasspath,testCompileClasspath +org.junit.platform:junit-platform-engine:1.9.2=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.9.2=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-runner:1.9.0=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-suite-api:1.9.0=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-suite-commons:1.9.0=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.junit:junit-bom:5.9.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.junit:junit-bom:5.9.1=spotbugs +org.objenesis:objenesis:3.3=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.opentest4j:opentest4j:1.2.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.ow2.asm:asm-analysis:9.2=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-analysis:9.4=spotbugs +org.ow2.asm:asm-commons:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath +org.ow2.asm:asm-commons:9.4=spotbugs +org.ow2.asm:asm-commons:9.8=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-tree:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath +org.ow2.asm:asm-tree:9.4=spotbugs +org.ow2.asm:asm-tree:9.8=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-util:9.2=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-util:9.4=spotbugs +org.ow2.asm:asm:9.2=instrumentPluginClasspath,muzzleTooling,runtimeClasspath +org.ow2.asm:asm:9.4=spotbugs +org.ow2.asm:asm:9.8=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.slf4j:jcl-over-slf4j:1.7.30=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.slf4j:jul-to-slf4j:1.7.30=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.slf4j:log4j-over-slf4j:1.7.30=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.slf4j:slf4j-api:1.7.30=compileClasspath,instrumentPluginClasspath,latest1xDepTestCompileClasspath,latestDepTestCompileClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath +org.slf4j:slf4j-api:1.7.32=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.slf4j:slf4j-api:2.0.0=spotbugs,spotbugsSlf4j +org.slf4j:slf4j-simple:2.0.0=spotbugsSlf4j +org.spockframework:spock-core:2.3-groovy-3.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.spockframework:spock-junit4:2.3-groovy-3.0=latest1xDepTestCompileClasspath,latest1xDepTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath +org.testng:testng:7.5=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.webjars:jquery:3.5.1=latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.xmlresolver:xmlresolver:4.4.3=spotbugs +org.yaml:snakeyaml:2.4=instrumentPluginClasspath,latest1xDepTestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testRuntimeClasspath +xml-apis:xml-apis:1.4.01=spotbugs +empty=spotbugsPlugins diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy deleted file mode 100644 index 48e1d32b329..00000000000 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/SpanAttributeAnnotationTest.groovy +++ /dev/null @@ -1,44 +0,0 @@ -import annotatedsample.TracedMethods -import datadog.trace.agent.test.AgentTestRunner -import datadog.trace.bootstrap.instrumentation.api.Tags - -class SpanAttributeAnnotationTest extends AgentTestRunner { - @Override - void configurePreAgent() { - super.configurePreAgent() - - injectSysConfig("dd.integration.opentelemetry-annotations-1.20.enabled", "true") - } - - def "test SpanAttribute annotated #type parameter"() { - setup: - def methodName = "sayHelloWith${typeName}Attribute" - TracedMethods."$methodName"(value) - - expect: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.$methodName" - operationName "TracedMethods.$methodName" - parent() - errored false - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - "custom-tag" value - } - } - } - } - - where: - type | value - 'String' | 'value' - 'int' | 12 - 'long' | 23456L - 'list' | ['value1', 'value2', 'value3'] - typeName = type.substring(0, 1).toUpperCase() + type.substring(1) - } -} - diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationLatestDepTest.groovy b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationLatestDepTest.groovy new file mode 100644 index 00000000000..43aa0eab4cf --- /dev/null +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationLatestDepTest.groovy @@ -0,0 +1,33 @@ +import annotatedsample.latest.TracedMethods +import datadog.trace.bootstrap.instrumentation.api.Tags + +import static datadog.trace.agent.test.utils.TraceUtils.basicSpan +import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace + +class WithSpanAnnotationLatestDepTest extends WithSpanAnnotationTest { + + def "test WithSpan annotated method inheritContext=false"() { + setup: + runUnderTrace("parent") { + TracedMethods.sayHelloWithInANewTrace() + } + expect: + assertTraces(2) { + trace(1) { + basicSpan(it, "parent") + } + trace(1) { + span { + resourceName "TracedMethods.sayHelloWithInANewTrace" + operationName "TracedMethods.sayHelloWithInANewTrace" + parent() + errored false + tags { + defaultTags() + "$Tags.COMPONENT" "opentelemetry" + } + } + } + } + } +} diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy deleted file mode 100644 index 14e68c4abf2..00000000000 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/groovy/WithSpanAnnotationTest.groovy +++ /dev/null @@ -1,303 +0,0 @@ -import annotatedsample.TracedMethods -import datadog.trace.agent.test.AgentTestRunner -import datadog.trace.api.DDSpanTypes -import datadog.trace.bootstrap.instrumentation.api.Tags - -import java.util.concurrent.CountDownLatch - -import static datadog.trace.agent.test.utils.TraceUtils.basicSpan -import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace - -class WithSpanAnnotationTest extends AgentTestRunner { - @Override - void configurePreAgent() { - super.configurePreAgent() - - injectSysConfig("dd.integration.opentelemetry-annotations-1.20.enabled", "true") - injectSysConfig("dd.measure.methods", "${TracedMethods.name}[sayHelloMeasured]") - } - - def "test WithSpan annotated method"() { - setup: - TracedMethods.sayHello() - - expect: - assertTraces(1) { - trace(1) { - span { - serviceName "custom-service-name" - resourceName "TracedMethods.sayHello" - operationName "TracedMethods.sayHello" - parent() - errored false - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated method with custom value"() { - setup: - TracedMethods.sayHelloWithCustomOperationName() - - expect: - assertTraces(1) { - trace(1) { - span { - serviceName "custom-service-name" - resourceName "custom-operation-name" - operationName "custom-operation-name" - parent() - errored false - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated method with #kind kind"() { - setup: - def methodName = "sayHelloWith${kindName}Kind" - TracedMethods."$methodName"() - - expect: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.${methodName}" - operationName "TracedMethods.${methodName}" - parent() - spanType(type) - errored false - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - - where: - kind | type - 'SERVER' | DDSpanTypes.HTTP_SERVER - 'CLIENT' | DDSpanTypes.HTTP_CLIENT - 'PRODUCER' | DDSpanTypes.MESSAGE_PRODUCER - 'CONSUMER' | DDSpanTypes.MESSAGE_CONSUMER - 'INTERNAL' | null - kindName = kind.substring(0, 1) + kind.substring(1).toLowerCase() - } - - def "test WithSpan annotated method throwing exception"() { - setup: - Throwable error = null - try { - TracedMethods.throwException() - } catch (final Throwable ex) { - error = ex - } - - expect: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.throwException" - operationName "TracedMethods.throwException" - errored true - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - errorTags(error.class, error.getMessage()) - } - } - } - } - } - - def "test WithSpan annotated anonymous inner method"() { - setup: - TracedMethods.traceAnonymousInnerClass() - - expect: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods\$1.call" - operationName "TracedMethods\$1.call" - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated async method (CompletableFuture)"() { - setup: - def latch = new CountDownLatch(1) - def completableFuture = TracedMethods.traceAsyncCompletableFuture(latch) - - expect: - TEST_WRITER.size() == 0 - - when: - latch.countDown() - completableFuture.join() - - then: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.traceAsyncCompletableFuture" - operationName "TracedMethods.traceAsyncCompletableFuture" - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated async method (failing CompletableFuture)"() { - setup: - def latch = new CountDownLatch(1) - def expectedException = new RuntimeException("Test exception") - def completableFuture = TracedMethods.traceAsyncFailingCompletableFuture(latch, expectedException) - - expect: - TEST_WRITER.size() == 0 - - when: - latch.countDown() - completableFuture.join() - - then: - thrown(RuntimeException) - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.traceAsyncFailingCompletableFuture" - operationName "TracedMethods.traceAsyncFailingCompletableFuture" - errored true - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - errorTags(expectedException) - } - } - } - } - } - - def "test WithSpan annotated async method (CompletionStage)"() { - setup: - def latch = new CountDownLatch(1) - def completionStage = TracedMethods.traceAsyncCompletionStage(latch) - - expect: - TEST_WRITER.size() == 0 - - when: - latch.countDown() - completionStage.toCompletableFuture().join() - - then: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.traceAsyncCompletionStage" - operationName "TracedMethods.traceAsyncCompletionStage" - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated async method (failing CompletionStage)"() { - setup: - def latch = new CountDownLatch(1) - def expectedException = new RuntimeException("Test exception") - def completionStage = TracedMethods.traceAsyncFailingCompletionStage(latch, expectedException) - - expect: - TEST_WRITER.size() == 0 - - when: - latch.countDown() - completionStage.toCompletableFuture().join() - - then: - thrown(RuntimeException) - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.traceAsyncFailingCompletionStage" - operationName "TracedMethods.traceAsyncFailingCompletionStage" - errored true - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - errorTags(expectedException) - } - } - } - } - } - - def "test WithSpan annotated measured method"() { - setup: - TracedMethods.sayHelloMeasured() - - expect: - assertTraces(1) { - trace(1) { - span { - resourceName "TracedMethods.sayHelloMeasured" - operationName "TracedMethods.sayHelloMeasured" - parent() - errored false - measured true - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } - - def "test WithSpan annotated method inheritContext=false"() { - setup: - runUnderTrace("parent") { - TracedMethods.sayHelloWithInANewTrace() - } - expect: - assertTraces(2) { - trace(1) { - basicSpan(it, "parent") - } - trace(1) { - span { - resourceName "TracedMethods.sayHelloWithInANewTrace" - operationName "TracedMethods.sayHelloWithInANewTrace" - parent() - errored false - tags { - defaultTags() - "$Tags.COMPONENT" "opentelemetry" - } - } - } - } - } -} diff --git a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/latest/TracedMethods.java similarity index 99% rename from dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java rename to dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/latest/TracedMethods.java index 356631d526f..07f5cb02aab 100644 --- a/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/TracedMethods.java +++ b/dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/latestDepTest/java/annotatedsample/latest/TracedMethods.java @@ -1,4 +1,4 @@ -package annotatedsample; +package annotatedsample.latest; import static datadog.trace.api.DDTags.SERVICE_NAME; import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.activeSpan;