Document (and remove some) upper version test limits (#12945)

This commit is contained in:
Trask Stalnaker 2024-12-27 08:54:10 -08:00 committed by GitHub
parent e5a9d1cfb7
commit 1a506cb246
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
63 changed files with 313 additions and 360 deletions

View File

@ -0,0 +1,21 @@
#!/bin/bash -e
# all missing version coverage should be documented in supported-libraries.md
if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
| grep -v :+\" \
| grep -v "// see .* module" \
| grep -v "// see test suite below" \
| grep -v "// no longer applicable" \
| grep -v "// related dependency" \
| grep -v "// native on-by-default instrumentation after this version" \
| grep -v "// documented limitation" \
| grep -v "instrumentation/jaxrs-client/jaxrs-client-2.0-testing/build.gradle.kts"; then
echo
echo "Found an undocumented latestDepTestLibrary (see above)."
echo
echo "See .gith/scripts/check-latest-dep-test-overrides.sh in this repository"
echo "and add one of the required comments."
exit 1
fi

View File

@ -1,6 +0,0 @@
#!/bin/bash -e
grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
| grep -v :+\" \
| grep -v "// see .* module" \
| grep -v "// documented limitation"

View File

@ -119,6 +119,13 @@ jobs:
exit 1
fi
check-latest-dep-test-overrides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: .github/scripts/check-latest-dep-test-overrides.sh
build:
runs-on: ubuntu-latest
steps:

View File

@ -23,9 +23,9 @@ These are the supported libraries and frameworks:
| [Akka HTTP](https://doc.akka.io/docs/akka-http/current/index.html) | 10.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics], Provides `http.route` [2] |
| [Alibaba Druid](https://github.com/alibaba/druid) | 1.0+ | [opentelemetry-alibaba-druid-1.0](../instrumentation/alibaba-druid-1.0/library) | [Database Pool Metrics] |
| [Apache Axis2](https://axis.apache.org/axis2/java/core/) | 1.6+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache Camel](https://camel.apache.org/) | 2.20+ (not including 3.x yet) | N/A | Dependent on components in use |
| [Apache CXF JAX-RS](https://cxf.apache.org/) | 3.2+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache CXF JAX-WS](https://cxf.apache.org/) | 3.0+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache Camel](https://camel.apache.org/) | 2.20+ (not including 3.0+ yet) | N/A | Dependent on components in use |
| [Apache CXF JAX-RS](https://cxf.apache.org/) | 3.2+ (not including 4.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache CXF JAX-WS](https://cxf.apache.org/) | 3.0+ (not including 4.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache DBCP](https://commons.apache.org/proper/commons-dbcp/) | 2.0+ | [opentelemetry-apache-dbcp-2.0](../instrumentation/apache-dbcp-2.0/library) | [Database Pool Metrics] |
| [Apache Dubbo](https://github.com/apache/dubbo/) | 2.7+ | [opentelemetry-apache-dubbo-2.7](../instrumentation/apache-dubbo-2.7/library-autoconfigure) | [RPC Client Spans], [RPC Server Spans] |
| [Apache HttpAsyncClient](https://hc.apache.org/index.html) | 4.1+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
@ -33,7 +33,7 @@ These are the supported libraries and frameworks:
| [Apache ShenYu](https://shenyu.apache.org/) | 2.4+ | N/A | Provides `http.route` [2] |
| [Apache Kafka Producer/Consumer API](https://kafka.apache.org/documentation/#producerapi) | 0.11+ | [opentelemetry-kafka-clients-2.6](../instrumentation/kafka/kafka-clients/kafka-clients-2.6/library) | [Messaging Spans] |
| [Apache Kafka Streams API](https://kafka.apache.org/documentation/streams/) | 0.11+ | N/A | [Messaging Spans] |
| [Apache MyFaces](https://myfaces.apache.org/) | 1.2+ (not including 3.x yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache MyFaces](https://myfaces.apache.org/) | 1.2+ (not including 4.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Apache Pekko Actors](https://pekko.apache.org/) | 1.0+ | N/A | Context propagation |
| [Apache Pekko HTTP](https://pekko.apache.org/) | 1.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics], Provides `http.route` [2] |
| [Apache Pulsar](https://pulsar.apache.org/) | 2.8+ | N/A | [Messaging Spans] |
@ -46,11 +46,11 @@ These are the supported libraries and frameworks:
| [Armeria gRPC](https://armeria.dev) | 1.14+ | | [RPC Client Spans], [RPC Client Metrics], [RPC Server Spans], [RPC Server Metrics] |
| [AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client) | 1.9+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
| [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/java-handler.html) | 1.0+ | [opentelemetry-aws-lambda-core-1.0](../instrumentation/aws-lambda/aws-lambda-core-1.0/library),<br>[opentelemetry-aws-lambda-events-2.2](../instrumentation/aws-lambda/aws-lambda-events-2.2/library) | [FaaS Server Spans] |
| [AWS SDK](https://aws.amazon.com/sdk-for-java/) | 1.11.x and 2.2+ | [opentelemetry-aws-sdk-1.11](../instrumentation/aws-sdk/aws-sdk-1.11/library),<br>[opentelemetry-aws-sdk-1.11-autoconfigure](../instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure),<br>[opentelemetry-aws-sdk-2.2](../instrumentation/aws-sdk/aws-sdk-2.2/library),<br>[opentelemetry-aws-sdk-2.2-autoconfigure](../instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigure) | [Messaging Spans], [Database Client Spans], [HTTP Client Spans] |
| [AWS SDK](https://aws.amazon.com/sdk-for-java/) | 1.11 - 1.12.583,<br>2.2+ | [opentelemetry-aws-sdk-1.11](../instrumentation/aws-sdk/aws-sdk-1.11/library),<br>[opentelemetry-aws-sdk-1.11-autoconfigure](../instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure),<br>[opentelemetry-aws-sdk-2.2](../instrumentation/aws-sdk/aws-sdk-2.2/library),<br>[opentelemetry-aws-sdk-2.2-autoconfigure](../instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigure) | [Messaging Spans], [Database Client Spans], [HTTP Client Spans] |
| [Azure Core](https://docs.microsoft.com/en-us/java/api/overview/azure/core-readme) | 1.14+ | N/A | Context propagation |
| [Cassandra Driver](https://github.com/datastax/java-driver) | 3.0+ | [opentelemetry-cassandra-4.4](../instrumentation/cassandra/cassandra-4.4/library) | [Database Client Spans] |
| [Clickhouse Client](https://github.com/ClickHouse/clickhouse-java) | 0.5+ | N/A | [Database Client Spans] |
| [Couchbase Client](https://github.com/couchbase/couchbase-java-client) | 2.0+ and 3.1+ | N/A | [Database Client Spans] |
| [Couchbase Client](https://github.com/couchbase/couchbase-java-client) | 2.0 - 2.7.x,<br>3.1+ | N/A | [Database Client Spans] |
| [c3p0](https://github.com/swaldman/c3p0) | 0.9.2+ | [opentelemetry-c3p0-0.9](../instrumentation/c3p0-0.9/library) | [Database Pool Metrics] |
| [Dropwizard Metrics](https://metrics.dropwizard.io/) | 4.0+ (disabled by default) | N/A | none |
| [Dropwizard Views](https://www.dropwizard.io/en/latest/manual/views.html) | 0.7+ | N/A | Controller Spans [3] |
@ -58,7 +58,7 @@ These are the supported libraries and frameworks:
| [Eclipse Jersey](https://eclipse-ee4j.github.io/jersey/) | 2.0+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Eclipse Jetty HTTP Client](https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/client/HttpClient.html) | 9.2 - 9.4.x,<br>12.0+ | [opentelemetry-jetty-httpclient-9.2](../instrumentation/jetty-httpclient/jetty-httpclient-9.2/library)<br>[opentelemetry-jetty-httpclient-12.0](../instrumentation/jetty-httpclient/jetty-httpclient-12.0/library) | [HTTP Client Spans], [HTTP Client Metrics] |
| [Eclipse Metro](https://projects.eclipse.org/projects/ee4j.metro) | 2.2+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Eclipse Mojarra](https://projects.eclipse.org/projects/ee4j.mojarra) | 1.2+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Eclipse Mojarra](https://projects.eclipse.org/projects/ee4j.mojarra) | 1.2+ (not including 4.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Elasticsearch API Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html) | 7.16 - 7.17.19,<br>8.0 - 8.9.+ [4] | N/A | [Elasticsearch Client Spans] |
| [Elasticsearch REST Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html) | 5.0+ | N/A | [Database Client Spans] |
| [Elasticsearch Transport Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html) | 5.0+ | N/A | [Database Client Spans] |
@ -84,13 +84,13 @@ These are the supported libraries and frameworks:
| [Javalin](https://javalin.io/) | 5.0+ | N/A | Provides `http.route` [2] |
| [JAX-RS](https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/package-summary.html) | 0.5+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [JAX-RS Client](https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/client/package-summary.html) | 1.1+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
| [JAX-WS](https://jakarta.ee/specifications/xml-web-services/2.3/apidocs/javax/xml/ws/package-summary.html) | 2.0+ (not including 3.x yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [JAX-WS](https://jakarta.ee/specifications/xml-web-services/2.3/apidocs/javax/xml/ws/package-summary.html) | 2.0+ (not including 3.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [JBoss Log Manager](https://github.com/jboss-logging/jboss-logmanager) | 1.1+ | N/A | none |
| [JDBC](https://docs.oracle.com/javase/8/docs/api/java/sql/package-summary.html) | Java 8+ | [opentelemetry-jdbc](../instrumentation/jdbc/library) | [Database Client Spans] |
| [Jedis](https://github.com/xetorthio/jedis) | 1.4+ | N/A | [Database Client Spans] |
| [JMS](https://javaee.github.io/javaee-spec/javadocs/javax/jms/package-summary.html) | 1.1+ | N/A | [Messaging Spans] |
| [Jodd Http](https://http.jodd.org/) | 4.2+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
| [JSP](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/jsp/package-summary.html) | 2.3+ | N/A | Controller Spans [3] |
| [JSP](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/jsp/package-summary.html) | 2.3.x only | N/A | Controller Spans [3] |
| [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html) | 1.0+ | N/A | Context propagation |
| [Ktor](https://github.com/ktorio/ktor) | 1.0+ | [opentelemetry-ktor-1.0](../instrumentation/ktor/ktor-1.0/library),<br>[opentelemetry-ktor-2.0](../instrumentation/ktor/ktor-2.0/library),<br>[opentelemetry-ktor-3.0](../instrumentation/ktor/ktor-3.0/library) | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics] |
| [Kubernetes Client](https://github.com/kubernetes-client/java) | 7.0+ | N/A | [HTTP Client Spans] |
@ -117,7 +117,8 @@ These are the supported libraries and frameworks:
| [Reactor Netty](https://github.com/reactor/reactor-netty) | 0.9+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
| [Rediscala](https://github.com/etaty/rediscala) | 1.8+ | N/A | [Database Client Spans] |
| [Redisson](https://github.com/redisson/redisson) | 3.0+ | N/A | [Database Client Spans] |
| [RESTEasy](https://resteasy.dev/) | 3.0+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [RESTEasy](https://resteasy.dev/) | 3.0+ (not including 6.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [RESTEasy](https://resteasy.dev/) | 3.0+ (not including 6.0+ yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Restlet](https://restlet.github.io/) | 1.0+ | [opentelemetry-restlet-1.1](../instrumentation/restlet/restlet-1.1/library),<br>[opentelemetry-restlet-2.0](../instrumentation/restlet/restlet-2.0/library) | [HTTP Server Spans], [HTTP Server Metrics] |
| [RMI](https://docs.oracle.com/en/java/javase/11/docs/api/java.rmi/java/rmi/package-summary.html) | Java 8+ | | [RPC Client Spans], [RPC Server Spans] |
| [RxJava](https://github.com/ReactiveX/RxJava) | 1.0+ | [opentelemetry-rxjava-1.0](../instrumentation/rxjava/rxjava-1.0/library),<br>[opentelemetry-rxjava-2.0](../instrumentation/rxjava/rxjava-2.0/library),<br>[opentelemetry-rxjava-3.0](../instrumentation/rxjava/rxjava-3.0/library),<br>[opentelemetry-rxjava-3.1.1](../instrumentation/rxjava/rxjava-3.1.1/library) | Context propagation |
@ -138,11 +139,11 @@ These are the supported libraries and frameworks:
| [Spring RMI](https://docs.spring.io/spring-framework/docs/4.0.x/javadoc-api/org/springframework/remoting/rmi/package-summary.html) | 4.0+ | N/A | [RPC Client Spans], [RPC Server Spans] |
| [Spring Scheduling](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/scheduling/package-summary.html) | 3.1+ | N/A | none |
| [Spring Web MVC](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/package-summary.html) | 3.1+ | [opentelemetry-spring-webmvc-5.3](../instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library),<br>[opentelemetry-spring-webmvc-6.0](../instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library) | [HTTP Server Spans], [HTTP Server Metrics], Provides `http.route` [2], Controller Spans [3] |
| [Spring Web Services](https://spring.io/projects/spring-ws) | 2.0+ | N/A | none |
| [Spring Web Services](https://spring.io/projects/spring-ws) | 2.0+ (not including 4.0+ yet) | N/A | none |
| [Spring WebFlux](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/reactive/package-summary.html) | 5.3+ | [opentelemetry-spring-webflux-5.3](../instrumentation/spring/spring-webflux/spring-webflux-5.3/library) | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics], Provides `http.route` [2], Controller Spans [3] |
| [Spymemcached](https://github.com/couchbase/spymemcached) | 2.12+ | N/A | [Database Client Spans] |
| [Tomcat JDBC Pool](https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html) | 8.5+ | N/A | [Database Pool Metrics] |
| [Twilio](https://github.com/twilio/twilio-java) | 6.6+ (not including 8.x yet) | N/A | none |
| [Twilio](https://github.com/twilio/twilio-java) | 6.6+ (not including 8.0+ yet) | N/A | none |
| [Undertow](https://undertow.io/) | 1.4+ | N/A | [HTTP Server Spans], [HTTP Server Metrics] |
| [Vaadin](https://vaadin.com/) | 14.2+ | N/A | Provides `http.route` [2], Controller Spans [3] |
| [Vert.x HttpClient](https://vertx.io/docs/apidocs/io/vertx/core/http/HttpClient.html) | 3.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |

View File

@ -12,7 +12,7 @@ muzzle {
}
dependencies {
compileOnly("org.apache.shenyu:shenyu-web:2.4.0")
library("org.apache.shenyu:shenyu-web:2.4.0")
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
@ -27,7 +27,7 @@ dependencies {
}
// the latest version of apache shenyu uses spring-boot 2.7
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.7.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.7.+") // related dependency
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
}

View File

@ -63,7 +63,7 @@ dependencies {
testImplementation("javax.xml.bind:jaxb-api:2.3.1")
// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}
testing {

View File

@ -20,7 +20,7 @@ dependencies {
testLibrary("com.amazonaws:aws-java-sdk-sqs:1.11.106")
// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}
tasks {

View File

@ -19,7 +19,7 @@ dependencies {
testLibrary("com.amazonaws:aws-java-sdk-sns:1.11.106")
// last version that does not use json protocol
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583")
latestDepTestLibrary("com.amazonaws:aws-java-sdk-sqs:1.12.583") // documented limitation
}
if (!(findProperty("testLatestDeps") as Boolean)) {

View File

@ -26,9 +26,8 @@ dependencies {
testImplementation(project(":instrumentation:couchbase:couchbase-common:testing"))
// later versions are tested with couchbase-2.6 instrumentation
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:2.+")
latestDepTestLibrary("com.couchbase.client:java-client:2.5.+")
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:2.+") // see couchbase-2.6 module
latestDepTestLibrary("com.couchbase.client:java-client:2.5.+") // see couchbase-2.6 module
}
tasks {

View File

@ -29,8 +29,8 @@ dependencies {
testLibrary("org.springframework.data:spring-data-couchbase:3.1.0.RELEASE")
testLibrary("com.couchbase.client:encryption:1.0.0")
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:3.1.+")
latestDepTestLibrary("com.couchbase.client:java-client:2.+")
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:3.1.+") // see couchbase-3.1 module
latestDepTestLibrary("com.couchbase.client:java-client:2.+") // see couchbase-3.1 module
}
tasks {

View File

@ -42,7 +42,7 @@ dependencies {
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
testImplementation("org.testcontainers:elasticsearch")
latestDepTestLibrary("co.elastic.clients:elasticsearch-java:7.17.19")
latestDepTestLibrary("co.elastic.clients:elasticsearch-java:7.17.19") // native on-by-default instrumentation after this version
}
val latestDepTest = findProperty("testLatestDeps") as Boolean

View File

@ -45,8 +45,8 @@ dependencies {
testLibrary("org.elasticsearch.plugin:transport-netty3-client:5.0.0")
testLibrary("org.elasticsearch.client:transport:5.0.0")
latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.0.0")
latestDepTestLibrary("org.elasticsearch.client:transport:5.0.0")
latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.2.+") // see elasticsearch-transport-5.3 module
latestDepTestLibrary("org.elasticsearch.client:transport:5.2.+") // see elasticsearch-transport-5.3 module
}
tasks {

View File

@ -43,7 +43,6 @@ class Elasticsearch5NodeClientTest extends AbstractElasticsearchNodeClientTest {
.put("transport.type", "netty3")
.put("http.type", "netty3")
.put(CLUSTER_NAME_SETTING.getKey(), clusterName)
.put("discovery.type", "local")
.build();
testNode =
new Node(

View File

@ -45,7 +45,6 @@ class Elasticsearch5TransportClientTest extends AbstractElasticsearchTransportCl
.put("transport.type", "netty3")
.put("http.type", "netty3")
.put(CLUSTER_NAME_SETTING.getKey(), clusterName)
.put("discovery.type", "local")
.build();
testNode =
new Node(

View File

@ -62,7 +62,7 @@ dependencies {
latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.+") // see elasticsearch-transport-6.0 module
latestDepTestLibrary("org.elasticsearch.client:transport:5.+") // see elasticsearch-transport-6.0 module
latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+")
latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+") // see elasticsearch-transport-6.0 module
}
tasks {

View File

@ -38,8 +38,8 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
testLibrary("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion")
latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+") // related dependency
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+") // related dependency
}
// testing-common pulls in groovy 4 and spock as dependencies, exclude them

View File

@ -22,5 +22,5 @@ dependencies {
testImplementation(project(":instrumentation:graphql-java:graphql-java-common:testing"))
latestDepTestLibrary("com.graphql-java:graphql-java:19.+")
latestDepTestLibrary("com.graphql-java:graphql-java:19.+") // see graphql-java-20.0 module
}

View File

@ -8,5 +8,5 @@ dependencies {
testImplementation(project(":instrumentation:graphql-java:graphql-java-common:testing"))
latestDepTestLibrary("com.graphql-java:graphql-java:19.+")
latestDepTestLibrary("com.graphql-java:graphql-java:19.+") // see graphql-java-20.0 module
}

View File

@ -18,8 +18,6 @@ dependencies {
testImplementation("org.springframework.data:spring-data-jpa:3.0.0")
springAgent("org.springframework:spring-instrument:6.0.7")
latestDepTestLibrary("org.hibernate:hibernate-core:6.2.+")
}
otelJava {

View File

@ -18,6 +18,9 @@ dependencies {
testInstrumentation(project(":instrumentation:http-url-connection:javaagent"))
testInstrumentation(project(":instrumentation:java-http-client:javaagent"))
// there's no test coverage beyond this, but there's no reason to believe it wouldn't work
// also note that this isn't really documented on supported-libraries.md because there's not
// really any instrumentation for it, as it just relies on other http client instrumentations
latestDepTestLibrary("org.glassfish.jersey.inject:jersey-hk2:2.+")
latestDepTestLibrary("org.glassfish.jersey.core:jersey-client:2.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-client:3.0.26.Final")

View File

@ -46,10 +46,10 @@ dependencies {
testLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.2.0")
testLibrary("org.apache.cxf:cxf-rt-ws-policy:3.2.0")
latestDepTestLibrary("org.eclipse.jetty:jetty-webapp:10.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxrs:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-ws-policy:3.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-webapp:10.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxrs:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http-jetty:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-ws-policy:3.+") // documented limitation
}
tasks.withType<Test>().configureEach {

View File

@ -67,7 +67,7 @@ dependencies {
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:3.0.+") { // see jaxrs-3.0-resteasy-3.1 module
exclude("org.jboss.resteasy", "resteasy-client")
}
latestDepTestLibrary("io.undertow:undertow-servlet:2.2.24.Final") // 2.3 switches to Servlet 5 / Jakarta namespace
latestDepTestLibrary("io.undertow:undertow-servlet:2.2.24.Final") // see jaxrs-3.0-resteasy-3.1 module
}
tasks {

View File

@ -60,9 +60,9 @@ dependencies {
testLibrary("org.jboss.resteasy:resteasy-servlet-initializer:3.1.0.Final")
// artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+")
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") {
latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+") // documented limitation
latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+") // documented limitation
latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") { // documented limitation
exclude("org.jboss.resteasy", "resteasy-client")
}
}

View File

@ -18,8 +18,8 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))
latestDepTestLibrary("com.sun.xml.ws:jaxws-rt:2.+")
latestDepTestLibrary("com.sun.xml.stream.buffer:streambuffer:1.+")
latestDepTestLibrary("com.sun.xml.ws:jaxws-rt:2.+") // see jaxws-3.0-metro-2.2-testing module
latestDepTestLibrary("com.sun.xml.stream.buffer:streambuffer:1.+") // see jaxws-3.0-metro-2.2-testing module
}
tasks.withType<Test>().configureEach {

View File

@ -40,8 +40,8 @@ dependencies {
testImplementation("javax.annotation:javax.annotation-api:1.2")
testImplementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxws:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http:3.+")
latestDepTestLibrary("org.apache.cxf:cxf-rt-frontend-jaxws:3.+") // documented limitation
latestDepTestLibrary("org.apache.cxf:cxf-rt-transports-http:3.+") // documented limitation
}
tasks.withType<Test>().configureEach {

View File

@ -32,7 +32,8 @@ dependencies {
testLibrary("com.zaxxer:HikariCP:2.4.0")
testLibrary("com.mchange:c3p0:0.9.5")
latestDepTestLibrary("org.apache.derby:derby:10.14.+")
// some classes in earlier versions of derby were split out into derbytools in later versions
latestDepTestLibrary("org.apache.derby:derbytools:+")
testImplementation(project(":instrumentation:jdbc:testing"))

View File

@ -10,5 +10,5 @@ dependencies {
testImplementation(project(":instrumentation:jetty-httpclient::jetty-httpclient-9.2:testing"))
latestDepTestLibrary("org.eclipse.jetty:jetty-client:9.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-client:9.+") // documented limitation
}

View File

@ -22,7 +22,7 @@ dependencies {
// jetty-servlet does not exist in jetty 12, so we don't need to explicitly pin it to 11.+
testLibrary("org.eclipse.jetty:jetty-servlet:11.0.0")
latestDepTestLibrary("org.eclipse.jetty:jetty-server:11.+")
latestDepTestLibrary("org.eclipse.jetty:jetty-server:11.+") // see jetty-12.0 module
}
otelJava {

View File

@ -27,11 +27,10 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-common:javaagent"))
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+")
latestDepTestLibrary("jakarta.faces:jakarta.faces-api:3.+")
latestDepTestLibrary("org.glassfish:jakarta.faces:3.+")
// JSF 4+ requires CDI instead of BeanManager, the test should be upgraded first
// latestDepTestLibrary("org.glassfish:jakarta.faces:4.+")
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+") // documented limitation
latestDepTestLibrary("jakarta.faces:jakarta.faces-api:3.+") // documented limitation
latestDepTestLibrary("org.glassfish:jakarta.faces:3.+") // documented limitation
}
tasks {

View File

@ -27,11 +27,10 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-common:javaagent"))
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+")
latestDepTestLibrary("org.apache.myfaces.core:myfaces-api:3.+")
latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:3.+")
// JSF 4+ requires CDI instead of BeanManager, the test should be upgraded first
// latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:4.+")
latestDepTestLibrary("jakarta.el:jakarta.el-api:4.+") // documented limitation
latestDepTestLibrary("org.apache.myfaces.core:myfaces-api:3.+") // documented limitation
latestDepTestLibrary("org.apache.myfaces.core:myfaces-impl:3.+") // documented limitation
}
tasks {

View File

@ -28,8 +28,8 @@ muzzle {
dependencies {
// compiling against tomcat 7.0.20 because there seems to be some issues with Tomcat's dependency < 7.0.20
compileOnly("org.apache.tomcat:tomcat-jasper:7.0.20")
compileOnly("javax.servlet.jsp:javax.servlet.jsp-api:2.3.0")
compileOnly("javax.servlet:javax.servlet-api:3.1.0")
library("javax.servlet.jsp:javax.servlet.jsp-api:2.3.0")
library("javax.servlet:javax.servlet-api:3.1.0")
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
@ -40,11 +40,9 @@ dependencies {
testLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.37")
testLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:7.0.37")
latestDepTestLibrary("javax.servlet.jsp:javax.servlet.jsp-api:+")
latestDepTestLibrary("javax.servlet:javax.servlet-api:+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-core:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:9.+")
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-core:9.+") // documented limitation
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:9.+") // documented limitation
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-logging-juli:9.+") // documented limitation
}
tasks.withType<Test>().configureEach {

View File

@ -46,10 +46,10 @@ dependencies {
testLibrary("io.ktor:ktor-server-netty:$ktorVersion")
testLibrary("io.ktor:ktor-client-cio:$ktorVersion")
latestDepTestLibrary("io.ktor:ktor-client-core:2.+")
latestDepTestLibrary("io.ktor:ktor-server-core:2.+")
latestDepTestLibrary("io.ktor:ktor-server-netty:2.+")
latestDepTestLibrary("io.ktor:ktor-client-cio:2.+")
latestDepTestLibrary("io.ktor:ktor-client-core:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-server-core:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-server-netty:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-client-cio:2.+") // see ktor-3.0 module
}
kotlin {

View File

@ -24,10 +24,10 @@ dependencies {
testLibrary("io.ktor:ktor-server-netty:$ktorVersion")
testLibrary("io.ktor:ktor-client-cio:$ktorVersion")
latestDepTestLibrary("io.ktor:ktor-client-core:2.+")
latestDepTestLibrary("io.ktor:ktor-server-core:2.+")
latestDepTestLibrary("io.ktor:ktor-server-netty:2.+")
latestDepTestLibrary("io.ktor:ktor-client-cio:2.+")
latestDepTestLibrary("io.ktor:ktor-client-core:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-server-core:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-server-netty:2.+") // see ktor-3.0 module
latestDepTestLibrary("io.ktor:ktor-client-cio:2.+") // see ktor-3.0 module
}
kotlin {

View File

@ -16,7 +16,7 @@ dependencies {
testInstrumentation(project(":instrumentation:okhttp:okhttp-3.0:javaagent"))
latestDepTestLibrary("io.kubernetes:client-java-api:19.+")
latestDepTestLibrary("io.kubernetes:client-java-api:19.+") // see test suite below
}
testing {

View File

@ -32,7 +32,7 @@ dependencies {
testLibrary("com.ning:async-http-client:1.8.0")
latestDepTestLibrary("io.netty:netty:3.+") // see netty-4.0 module
latestDepTestLibrary("com.ning:async-http-client:1.9.+")
latestDepTestLibrary("com.ning:async-http-client:1.9.+") // see netty-4.0 module
}
// We need to force the dependency to the earliest supported version because other libraries declare newer versions.

View File

@ -45,7 +45,7 @@ dependencies {
latestDepTestLibrary("com.typesafe.play:play-java_2.11:2.5.+") // see play-2.6 module
latestDepTestLibrary("com.typesafe.play:play-java-ws_2.11:2.5.+") // see play-2.6 module
latestDepTestLibrary("com.typesafe.play:play-test_2.11:2.5.+")
latestDepTestLibrary("com.typesafe.play:play-test_2.11:2.5.+") // see play-2.6 module
}
testing {

View File

@ -37,5 +37,5 @@ dependencies {
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.3:javaagent"))
latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:1.+")
latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:1.+") // see play-ws-2.0 module
}

View File

@ -43,5 +43,5 @@ dependencies {
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.3:javaagent"))
latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:2.0.+")
latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:2.0.+") // see play-ws-2.1 module
}

View File

@ -28,12 +28,11 @@ dependencies {
testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.4:javaagent"))
testImplementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
testLibrary("io.projectreactor.kafka:reactor-kafka:1.0.0.RELEASE")
latestDepTestLibrary("io.projectreactor:reactor-core:3.4.+")
}
val testLatestDeps = findProperty("testLatestDeps") as Boolean

View File

@ -34,15 +34,13 @@ dependencies {
testInstrumentation(project(":instrumentation:reactor:reactor-netty:reactor-netty-0.9:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.4:javaagent"))
// using 3.4.3 to avoid the "Spec. Rule 1.3" issue in reactor-core during tests
// https://github.com/reactor/reactor-core/issues/2579
testLibrary("io.projectreactor:reactor-test:3.4.3")
testLibrary("io.projectreactor:reactor-core:3.4.3")
testImplementation(project(":instrumentation-annotations"))
latestDepTestLibrary("io.projectreactor:reactor-core:3.4.+")
latestDepTestLibrary("io.projectreactor.netty:reactor-netty-http:1.0.+")
}
tasks {

View File

@ -1,5 +1,6 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
@ -16,7 +17,9 @@ dependencies {
library("org.scala-lang:scala-library:2.8.0")
latestDepTestLibrary("org.scala-lang:scala-library:2.11.+")
// scala's ForkJoinPool was turned into an alias in scala 2.12 (which is why muzzle doesn't pass
// on that version) and was removed completely in scala 2.13
latestDepTestLibrary("org.scala-lang:scala-library:2.12.+") // no longer applicable
testImplementation(project(":instrumentation:executors:testing"))
}

View File

@ -1,114 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.jetbrains.annotations.NotNull;
import scala.concurrent.forkjoin.ForkJoinPool;
import scala.concurrent.forkjoin.ForkJoinTask;
public class ForkJoinPoolBridge implements ExecutorService {
private final ForkJoinPool delegate;
public ForkJoinPoolBridge(ForkJoinPool delegate) {
this.delegate = delegate;
}
@Override
public void shutdown() {
delegate.shutdown();
}
@NotNull
@Override
public List<Runnable> shutdownNow() {
return delegate.shutdownNow();
}
@Override
public boolean isShutdown() {
return delegate.isShutdown();
}
@Override
public boolean isTerminated() {
return delegate.isTerminated();
}
@Override
public boolean awaitTermination(long timeout, @NotNull TimeUnit unit)
throws InterruptedException {
return delegate.awaitTermination(timeout, unit);
}
@NotNull
@Override
public <T> Future<T> submit(@NotNull Callable<T> task) {
return delegate.submit(task);
}
@NotNull
@Override
public <T> Future<T> submit(@NotNull Runnable task, T result) {
return delegate.submit(task, result);
}
@NotNull
@Override
public Future<?> submit(@NotNull Runnable task) {
return delegate.submit(task);
}
@NotNull
@Override
public <T> List<Future<T>> invokeAll(@NotNull Collection<? extends Callable<T>> tasks) {
return delegate.invokeAll(tasks);
}
@NotNull
@Override
public <T> List<Future<T>> invokeAll(
@NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull TimeUnit unit) {
// Scala 2.8's ForkJoinPool doesn't have corresponding method
return delegate.invokeAll(tasks);
}
@NotNull
@Override
public <T> T invokeAny(@NotNull Collection<? extends Callable<T>> tasks)
throws InterruptedException, ExecutionException {
// Scala 2.8's ForkJoinPool doesn't have corresponding method
return delegate.submit(tasks.iterator().next()).get();
}
@Override
public <T> T invokeAny(
@NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull TimeUnit unit)
throws InterruptedException, ExecutionException {
// Scala 2.8's ForkJoinPool doesn't have corresponding method
return delegate.submit(tasks.iterator().next()).get();
}
public <T> T invoke(ForkJoinTask<T> task) {
return delegate.invoke(task);
}
@Override
public void execute(@NotNull Runnable command) {
delegate.execute(command);
}
public <T> void execute(ForkJoinTask<T> task) {
delegate.execute(task);
}
}

View File

@ -1,80 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.javaagent.instrumentation.executors.TestTask;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import scala.concurrent.forkjoin.ForkJoinTask;
final class ScalaAsyncChild extends ForkJoinTask<Object> implements TestTask {
private static final Tracer tracer = GlobalOpenTelemetry.getTracer("test");
private final AtomicBoolean blockThread;
private final boolean doTraceableWork;
private final CountDownLatch latch = new CountDownLatch(1);
public ScalaAsyncChild(boolean doTraceableWork, boolean blockThread) {
this.doTraceableWork = doTraceableWork;
this.blockThread = new AtomicBoolean(blockThread);
}
@Override
public Object getRawResult() {
return null;
}
@Override
protected void setRawResult(Object value) {}
@Override
protected boolean exec() {
runImpl();
return true;
}
@Override
public void unblock() {
blockThread.set(false);
}
@Override
public void run() {
runImpl();
}
@Override
public Object call() {
runImpl();
return null;
}
@Override
public void waitForCompletion() {
try {
latch.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new AssertionError(e);
}
}
private void runImpl() {
while (blockThread.get()) {
// busy-wait to block thread
}
if (doTraceableWork) {
asyncChild();
}
latch.countDown();
}
private static void asyncChild() {
tracer.spanBuilder("asyncChild").startSpan().end();
}
}

View File

@ -1,40 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.javaagent.instrumentation.executors.AbstractExecutorServiceTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import scala.concurrent.forkjoin.ForkJoinPool;
import scala.concurrent.forkjoin.ForkJoinTask;
class ScalaExecutorInstrumentationTest
extends AbstractExecutorServiceTest<ForkJoinPoolBridge, ScalaAsyncChild> {
@RegisterExtension
static final InstrumentationExtension testing = AgentInstrumentationExtension.create();
ScalaExecutorInstrumentationTest() {
super(new ForkJoinPoolBridge(new ForkJoinPool()), testing);
}
@Override
protected ScalaAsyncChild newTask(boolean doTraceableWork, boolean blockThread) {
return new ScalaAsyncChild(doTraceableWork, blockThread);
}
@Test
void invokeForkJoinTask() {
executeTwoTasks(task -> executor().invoke((ForkJoinTask<?>) task));
}
@Test
void executeForkJoinTask() {
executeTwoTasks(task -> executor().execute((ForkJoinTask<?>) task));
}
}

View File

@ -0,0 +1,68 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors
import io.opentelemetry.api.GlobalOpenTelemetry
import io.opentelemetry.api.trace.Tracer
import io.opentelemetry.javaagent.instrumentation.executors.TestTask
import java.util.concurrent.CountDownLatch
import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.forkjoin.ForkJoinTask
final class AsyncChild(doTraceableWork: Boolean, blockThread: Boolean)
extends ForkJoinTask[AnyRef]
with TestTask {
private val tracer: Tracer = GlobalOpenTelemetry.getTracer("test")
private val blockThreadAtomic: AtomicBoolean = new AtomicBoolean(blockThread)
private val latch: CountDownLatch = new CountDownLatch(1)
override def getRawResult: AnyRef = null
override def setRawResult(value: AnyRef): Unit = {}
override def exec(): Boolean = {
runImpl()
true
}
override def unblock(): Unit = {
blockThreadAtomic.set(false)
}
override def run(): Unit = {
runImpl()
}
override def call(): AnyRef = {
runImpl()
null
}
override def waitForCompletion(): Unit = {
try {
latch.await()
} catch {
case e: InterruptedException =>
Thread.currentThread().interrupt()
throw new AssertionError(e)
}
}
private def runImpl(): Unit = {
while (blockThreadAtomic.get()) {
// busy-wait to block thread
}
if (doTraceableWork) {
asyncChild()
}
latch.countDown()
}
private def asyncChild(): Unit = {
tracer.spanBuilder("asyncChild").startSpan().end()
}
}

View File

@ -0,0 +1,52 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension
import io.opentelemetry.javaagent.instrumentation.executors.AbstractExecutorServiceTest
import io.opentelemetry.javaagent.instrumentation.scalaexecutors.ExecutorInstrumentationTest.testing
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import org.junit.jupiter.api.function.ThrowingConsumer
import scala.concurrent.forkjoin.{ForkJoinPool, ForkJoinTask}
class ExecutorInstrumentationTest
extends AbstractExecutorServiceTest[ForkJoinPoolBridge, AsyncChild](
new ForkJoinPoolBridge(new ForkJoinPool),
testing
) {
@RegisterExtension val extension = testing
override protected def newTask(
doTraceableWork: Boolean,
blockThread: Boolean
): AsyncChild = {
new AsyncChild(doTraceableWork, blockThread)
}
@Test
def invokeForkJoinTask(): Unit = {
executeTwoTasks(new ThrowingConsumer[AsyncChild]() {
override def accept(task: AsyncChild): Unit =
executor().invoke(task.asInstanceOf[ForkJoinTask[_]])
})
}
@Test
def executeForkJoinTask(): Unit = {
executeTwoTasks(new ThrowingConsumer[AsyncChild]() {
override def accept(task: AsyncChild): Unit =
executor().execute(task.asInstanceOf[ForkJoinTask[_]])
})
}
}
object ExecutorInstrumentationTest {
val testing: AgentInstrumentationExtension =
AgentInstrumentationExtension.create
}

View File

@ -0,0 +1,58 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.scalaexecutors
import java.util.concurrent._
import scala.concurrent.forkjoin.{ForkJoinPool, ForkJoinTask}
class ForkJoinPoolBridge(delegate: ForkJoinPool) extends ExecutorService {
override def shutdown(): Unit = delegate.shutdown()
override def shutdownNow(): java.util.List[Runnable] = delegate.shutdownNow()
override def isShutdown: Boolean = delegate.isShutdown
override def isTerminated: Boolean = delegate.isTerminated
override def awaitTermination(timeout: Long, unit: TimeUnit): Boolean =
delegate.awaitTermination(timeout, unit)
override def submit[T](task: Callable[T]): Future[T] = delegate.submit(task)
override def submit[T](task: Runnable, result: T): Future[T] =
delegate.submit(task, result)
override def submit(task: Runnable): Future[_] = delegate.submit(task)
override def invokeAll[T](
tasks: java.util.Collection[_ <: Callable[T]]
): java.util.List[Future[T]] =
delegate.invokeAll(tasks)
override def invokeAll[T](
tasks: java.util.Collection[_ <: Callable[T]],
timeout: Long,
unit: TimeUnit
): java.util.List[Future[T]] =
delegate.invokeAll(tasks)
override def invokeAny[T](tasks: java.util.Collection[_ <: Callable[T]]): T =
delegate.submit(tasks.iterator().next()).get()
override def invokeAny[T](
tasks: java.util.Collection[_ <: Callable[T]],
timeout: Long,
unit: TimeUnit
): T =
delegate.submit(tasks.iterator().next()).get()
def invoke[T](task: ForkJoinTask[T]): T = delegate.invoke(task)
override def execute(command: Runnable): Unit = delegate.execute(command)
def execute[T](task: ForkJoinTask[T]): Unit = delegate.execute(task)
}

View File

@ -19,7 +19,7 @@ dependencies {
testInstrumentation(project(":instrumentation:spring:spring-core-2.0:javaagent"))
// spring batch 5.0 uses spring framework 6.0
latestDepTestLibrary("org.springframework.batch:spring-batch-core:4.+")
latestDepTestLibrary("org.springframework.batch:spring-batch-core:4.+") // documented limitation
}
tasks {

View File

@ -25,9 +25,6 @@ dependencies {
testImplementation("io.awspring.cloud:spring-cloud-aws-starter-sqs:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")
// current latest release 3.3.0-M1 has parent that is from central
latestDepTestLibrary("io.awspring.cloud:spring-cloud-aws-starter-sqs:3.2.1")
}
otelJava {

View File

@ -23,8 +23,8 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-starter-gateway:2.1.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.1.+")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-starter-gateway:2.1.+") // see spring-cloud-gateway-2.2:testing module
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.1.+") // see spring-cloud-gateway-2.2:testing module
}
tasks.withType<Test>().configureEach {

View File

@ -13,9 +13,6 @@ dependencies {
testLibrary("org.springframework.cloud:spring-cloud-starter-gateway:2.2.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-test:2.2.0.RELEASE")
// current latest spring cloud is not compatible with spring boot 3.4.0
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.3.+")
}
tasks.withType<Test>().configureEach {

View File

@ -39,10 +39,10 @@ dependencies {
testImplementation("org.hsqldb:hsqldb:2.0.0")
// limit to spring 5; spring 6 is tested in its separate module
latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+")
latestDepTestLibrary("org.springframework.data:spring-data-commons:2.+")
latestDepTestLibrary("org.springframework.data:spring-data-jpa:2.+")
latestDepTestLibrary("org.springframework:spring-test:5.+")
latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+") // see spring-data-3.0:testing module
latestDepTestLibrary("org.springframework.data:spring-data-commons:2.+") // see spring-data-3.0:testing module
latestDepTestLibrary("org.springframework.data:spring-data-jpa:2.+") // see spring-data-3.0:testing module
latestDepTestLibrary("org.springframework:spring-test:5.+") // see spring-data-3.0:testing module
}
tasks {

View File

@ -20,8 +20,6 @@ dependencies {
testImplementation("org.hsqldb:hsqldb:2.0.0")
testImplementation("com.h2database:h2:1.4.197")
testImplementation("io.r2dbc:r2dbc-h2:1.0.0.RELEASE")
latestDepTestLibrary("org.hibernate.orm:hibernate-core:6.2.+")
}
otelJava {

View File

@ -33,11 +33,11 @@ dependencies {
testImplementation("javax.servlet:javax.servlet-api:3.1.0")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream:3.+")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:3.+")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+") // documented limitation
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream:3.+") // documented limitation
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:3.+") // documented limitation
}
tasks {

View File

@ -15,11 +15,11 @@ dependencies {
testLibrary("org.springframework.cloud:spring-cloud-stream:2.2.1.RELEASE")
testLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:2.2.1.RELEASE")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream:3.+")
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:3.+")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+") // documented limitation
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream:3.+") // documented limitation
latestDepTestLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:3.+") // documented limitation
}
tasks {

View File

@ -37,7 +37,7 @@ dependencies {
exclude("org.jboss.naming", "jnpserver")
}
latestDepTestLibrary("org.springframework:spring-jms:5.+")
latestDepTestLibrary("org.springframework:spring-jms:5.+") // see spring-jms-6.0 module
}
testing {

View File

@ -37,9 +37,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-security:1.5.17.RELEASE")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+") // see spring-webmvc-6.0 module
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+") // see spring-webmvc-6.0 module
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:2.+") // see spring-webmvc-6.0 module
}
tasks.withType<Test>().configureEach {

View File

@ -38,8 +38,8 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web-services:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web-services:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web-services:2.+") // documented limitation
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+") // documented limitation
testImplementation("wsdl4j:wsdl4j:1.6.3")
testImplementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")

View File

@ -27,7 +27,7 @@ dependencies {
testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))
testInstrumentation(project(":instrumentation:struts:struts-7.0:javaagent"))
latestDepTestLibrary("org.apache.struts:struts2-core:6.+")
latestDepTestLibrary("org.apache.struts:struts2-core:6.+") // see struts2-7.0 module
}
tasks.withType<Test>().configureEach {

View File

@ -27,9 +27,8 @@ dependencies {
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
// Vert.x 4.0 is incompatible with our tests.
// 3.9.7 Requires Netty 4.1.60, no other version works with it.
latestDepTestLibrary(enforcedPlatform("io.netty:netty-bom:4.1.60.Final"))
latestDepTestLibrary(enforcedPlatform("io.netty:netty-bom:4.1.60.Final")) // see vertx-http-client-4.0 module
latestDepTestLibrary("io.vertx:vertx-core:3.+") // see vertx-http-client-4.0 module
latestDepTestLibrary("io.vertx:vertx-codegen:3.+") // see vertx-http-client-4.0 module
latestDepTestLibrary("io.vertx:vertx-docgen:3.+") // see vertx-http-client-4.0 module

View File

@ -14,7 +14,7 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
latestDepTestLibrary("org.apache.wicket:wicket:9.+")
latestDepTestLibrary("org.apache.wicket:wicket:9.+") // see wicket10-testing module
}
val latestDepTest = findProperty("testLatestDeps") as Boolean

View File

@ -23,7 +23,7 @@ dependencies {
// It needs the javax.annotation-api in xxl-job-core 1.9.2.
testImplementation("javax.annotation:javax.annotation-api:1.3.2")
testImplementation(project(":instrumentation:xxl-job:xxl-job-common:testing"))
latestDepTestLibrary("com.xuxueli:xxl-job-core:2.1.1") {
latestDepTestLibrary("com.xuxueli:xxl-job-core:2.1.1") { // see xxl-job-2.1.2 module
exclude("org.codehaus.groovy", "groovy")
}
}

View File

@ -21,7 +21,7 @@ dependencies {
testInstrumentation(project(":instrumentation:xxl-job:xxl-job-2.3.0:javaagent"))
testImplementation(project(":instrumentation:xxl-job:xxl-job-common:testing"))
latestDepTestLibrary("com.xuxueli:xxl-job-core:2.2.+") {
latestDepTestLibrary("com.xuxueli:xxl-job-core:2.2.+") { // see xxl-job-2.3.0 module
exclude("org.codehaus.groovy", "groovy")
}
}