Migrate instrumentation gradle files to kotlin (#3414)

* Migrate instrumentation gradle files to kotlin

* Convert

* Muzzle
This commit is contained in:
Anuraag Agrawal 2021-06-28 17:27:12 +09:00 committed by GitHub
parent 9e2fcbaecd
commit 761b9c280b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
450 changed files with 6133 additions and 5962 deletions

View File

@ -14,14 +14,14 @@ abstract class MuzzleExtension @Inject constructor(private val objectFactory: Ob
internal abstract val directives: ListProperty<MuzzleDirective>
fun pass(action: Action<in MuzzleDirective?>) {
fun pass(action: Action<MuzzleDirective>) {
val pass = objectFactory.newInstance(MuzzleDirective::class.java)
action.execute(pass)
pass.assertPass.set(true)
directives.add(pass)
}
fun fail(action: Action<in MuzzleDirective?>) {
fun fail(action: Action<MuzzleDirective>) {
val fail = objectFactory.newInstance(MuzzleDirective::class.java)
action.execute(fail)
fail.assertPass.set(false)

View File

@ -6,4 +6,6 @@ org.gradle.priority=low
# Gradle default is 256m which causes issues with our build - https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
org.gradle.warning.mode=fail
# TODO(anuraaga): Reenable closer to Gradle 8.0. Currently protobuf plugin fails due to bug
# https://github.com/google/protobuf-gradle-plugin/issues/444
# org.gradle.warning.mode=fail

View File

@ -1,36 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group = 'com.typesafe.akka'
module = 'akka-actor_2.11'
versions = "[2.5.0,)"
}
pass {
group = 'com.typesafe.akka'
module = 'akka-actor_2.12'
versions = "[2.5.0,)"
}
pass {
group = 'com.typesafe.akka'
module = 'akka-actor_2.13'
versions = "(,)"
}
}
dependencies {
compileOnly "com.typesafe.akka:akka-actor_2.11:2.5.0"
testImplementation "com.typesafe.akka:akka-actor_2.11:2.5.0"
latestDepTestLibrary "com.typesafe.akka:akka-actor_2.13:+"
}
if (findProperty('testLatestDeps')) {
configurations {
// akka artifact name is different for regular and latest tests
testImplementation.exclude group: 'com.typesafe.akka', module: 'akka-actor_2.11'
}
}

View File

@ -0,0 +1,38 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group.set("com.typesafe.akka")
module.set("akka-actor_2.11")
versions.set("[2.5.0,)")
}
pass {
group.set("com.typesafe.akka")
module.set("akka-actor_2.12")
versions.set("[2.5.0,)")
}
pass {
group.set("com.typesafe.akka")
module.set("akka-actor_2.13")
versions.set("(,)")
}
}
dependencies {
compileOnly("com.typesafe.akka:akka-actor_2.11:2.5.0")
testImplementation("com.typesafe.akka:akka-actor_2.11:2.5.0")
latestDepTestLibrary("com.typesafe.akka:akka-actor_2.13:+")
}
if (findProperty("testLatestDeps") as Boolean) {
configurations {
// akka artifact name is different for regular and latest tests
testImplementation {
exclude("com.typesafe.akka", "akka-actor_2.11")
}
}
}

View File

@ -1,16 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group = 'com.typesafe.akka'
module = 'akka-actor_2.11'
versions = "[2.5.0,)"
}
}
dependencies {
library "com.typesafe.akka:akka-actor_2.11:2.5.0"
}

View File

@ -0,0 +1,16 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group.set("com.typesafe.akka")
module.set("akka-actor_2.11")
versions.set("[2.5.0,)")
}
}
dependencies {
library("com.typesafe.akka:akka-actor_2.11:2.5.0")
}

View File

@ -1,53 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group = 'com.typesafe.akka'
module = 'akka-http_2.11'
versions = "[10.0.0,10.1.0)"
// later versions of akka-http expect streams to be provided
extraDependency 'com.typesafe.akka:akka-stream_2.11:2.4.14'
}
pass {
group = 'com.typesafe.akka'
module = 'akka-http_2.12'
versions = "[10.0.0,10.1.0)"
// later versions of akka-http expect streams to be provided
extraDependency 'com.typesafe.akka:akka-stream_2.12:2.4.14'
}
pass {
group = 'com.typesafe.akka'
module = 'akka-http_2.11'
versions = "[10.1.0,)"
// later versions of akka-http expect streams to be provided
extraDependency 'com.typesafe.akka:akka-stream_2.11:2.5.11'
}
pass {
group = 'com.typesafe.akka'
module = 'akka-http_2.12'
versions = "[10.1.0,)"
// later versions of akka-http expect streams to be provided
extraDependency 'com.typesafe.akka:akka-stream_2.12:2.5.11'
}
//There is no akka-http 10.0.x series for scala 2.13
pass {
group = 'com.typesafe.akka'
module = 'akka-http_2.13'
versions = "[10.1.8,)"
// later versions of akka-http expect streams to be provided
extraDependency 'com.typesafe.akka:akka-stream_2.13:2.5.23'
}
}
dependencies {
library "com.typesafe.akka:akka-http_2.11:10.0.0"
library "com.typesafe.akka:akka-stream_2.11:2.4.14"
// these instrumentations are not needed for the tests to pass
// they are here to test for context leaks
testInstrumentation project(':instrumentation:akka-actor-2.5:javaagent')
testInstrumentation project(':instrumentation:akka-actor-fork-join-2.5:javaagent')
}

View File

@ -0,0 +1,53 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
group.set("com.typesafe.akka")
module.set("akka-http_2.11")
versions.set("[10.0.0,10.1.0)")
// later versions of akka-http expect streams to be provided
extraDependency("com.typesafe.akka:akka-stream_2.11:2.4.14")
}
pass {
group.set("com.typesafe.akka")
module.set("akka-http_2.12")
versions.set("[10.0.0,10.1.0)")
// later versions of akka-http expect streams to be provided
extraDependency("com.typesafe.akka:akka-stream_2.12:2.4.14")
}
pass {
group.set("com.typesafe.akka")
module.set("akka-http_2.11")
versions.set("[10.1.0,)")
// later versions of akka-http expect streams to be provided
extraDependency("com.typesafe.akka:akka-stream_2.11:2.5.11")
}
pass {
group.set("com.typesafe.akka")
module.set("akka-http_2.12")
versions.set("[10.1.0,)")
// later versions of akka-http expect streams to be provided
extraDependency("com.typesafe.akka:akka-stream_2.12:2.5.11")
}
//There is no akka-http 10.0.x series for scala 2.13
pass {
group.set("com.typesafe.akka")
module.set("akka-http_2.13")
versions.set("[10.1.8,)")
// later versions of akka-http expect streams to be provided
extraDependency("com.typesafe.akka:akka-stream_2.13:2.5.23")
}
}
dependencies {
library("com.typesafe.akka:akka-http_2.11:10.0.0")
library("com.typesafe.akka:akka-stream_2.11:2.4.14")
// these instrumentations are not needed for the tests to pass
// they are here to test for context leaks
testInstrumentation(project(":instrumentation:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka-actor-fork-join-2.5:javaagent"))
}

View File

@ -1,14 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation project(':instrumentation:apache-camel-2.20:javaagent')
testImplementation "org.apache.camel:camel-core:2.20.1"
testImplementation "org.apache.camel:camel-aws:2.20.1"
testImplementation "org.apache.camel:camel-http:2.20.1"
testImplementation "io.opentelemetry:opentelemetry-extension-trace-propagators"
testImplementation "io.opentelemetry:opentelemetry-extension-aws"
testImplementation "org.assertj:assertj-core"
}

View File

@ -0,0 +1,14 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation(project(":instrumentation:apache-camel-2.20:javaagent"))
testImplementation("org.apache.camel:camel-core:2.20.1")
testImplementation("org.apache.camel:camel-aws:2.20.1")
testImplementation("org.apache.camel:camel-http:2.20.1")
testImplementation("io.opentelemetry:opentelemetry-extension-trace-propagators")
testImplementation("io.opentelemetry:opentelemetry-extension-aws")
testImplementation("org.assertj:assertj-core")
}

View File

@ -1,65 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.apache.camel"
module = "camel-core"
versions = "[2.20.1,3)"
}
}
ext {
camelversion = '2.20.1'
}
dependencies {
library "org.apache.camel:camel-core:$camelversion"
implementation "io.opentelemetry:opentelemetry-extension-aws"
testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-2.0:javaagent')
testInstrumentation project(':instrumentation:servlet:servlet-3.0:javaagent')
testInstrumentation project(':instrumentation:aws-sdk:aws-sdk-1.11:javaagent')
testLibrary "org.apache.camel:camel-spring-boot-starter:$camelversion"
testLibrary "org.apache.camel:camel-jetty-starter:$camelversion"
testLibrary "org.apache.camel:camel-http-starter:$camelversion"
testLibrary "org.apache.camel:camel-jaxb-starter:$camelversion"
testLibrary "org.apache.camel:camel-undertow:$camelversion"
testLibrary "org.apache.camel:camel-aws:$camelversion"
testImplementation "org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE"
testImplementation "org.springframework.boot:spring-boot-starter:1.5.17.RELEASE"
testImplementation "org.spockframework:spock-spring:${versions["org.spockframework"]}"
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
testImplementation "org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0"
testImplementation "org.testcontainers:localstack:${versions["org.testcontainers"]}"
latestDepTestLibrary "org.apache.camel:camel-core:2.+"
latestDepTestLibrary "org.apache.camel:camel-spring-boot-starter:2.+"
latestDepTestLibrary "org.apache.camel:camel-jetty-starter:2.+"
latestDepTestLibrary "org.apache.camel:camel-http-starter:2.+"
latestDepTestLibrary "org.apache.camel:camel-jaxb-starter:2.+"
latestDepTestLibrary "org.apache.camel:camel-undertow:2.+"
latestDepTestLibrary "org.apache.camel:camel-aws:2.+"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.apache-camel.experimental-span-attributes=true"
jvmArgs "-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true"
}
javadoc {
dependencies {
// without adding this dependency, javadoc fails:
// warning: unknown enum constant XmlAccessType.PROPERTY
// reason: class file for javax.xml.bind.annotation.XmlAccessType not found
// due to usage of org.apache.camel.model.RouteDefinition in CamelTracingService
// which has jaxb class-level annotations
compileOnly 'javax.xml.bind:jaxb-api:2.3.1'
}
}

View File

@ -0,0 +1,67 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.apache.camel")
module.set("camel-core")
versions.set("[2.20.1,3)")
}
}
val camelversion = "2.20.1"
val versions: Map<String, String> by project
dependencies {
library("org.apache.camel:camel-core:$camelversion")
implementation("io.opentelemetry:opentelemetry-extension-aws")
testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-2.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:aws-sdk:aws-sdk-1.11:javaagent"))
testLibrary("org.apache.camel:camel-spring-boot-starter:$camelversion")
testLibrary("org.apache.camel:camel-jetty-starter:$camelversion")
testLibrary("org.apache.camel:camel-http-starter:$camelversion")
testLibrary("org.apache.camel:camel-jaxb-starter:$camelversion")
testLibrary("org.apache.camel:camel-undertow:$camelversion")
testLibrary("org.apache.camel:camel-aws:$camelversion")
testImplementation("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
testImplementation("org.springframework.boot:spring-boot-starter:1.5.17.RELEASE")
testImplementation("org.spockframework:spock-spring:${versions["org.spockframework"]}")
testImplementation("javax.xml.bind:jaxb-api:2.3.1")
testImplementation("org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0")
testImplementation("org.testcontainers:localstack:${versions["org.testcontainers"]}")
latestDepTestLibrary("org.apache.camel:camel-core:2.+")
latestDepTestLibrary("org.apache.camel:camel-spring-boot-starter:2.+")
latestDepTestLibrary("org.apache.camel:camel-jetty-starter:2.+")
latestDepTestLibrary("org.apache.camel:camel-http-starter:2.+")
latestDepTestLibrary("org.apache.camel:camel-jaxb-starter:2.+")
latestDepTestLibrary("org.apache.camel:camel-undertow:2.+")
latestDepTestLibrary("org.apache.camel:camel-aws:2.+")
}
tasks {
withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.apache-camel.experimental-span-attributes=true")
jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
}
named<Javadoc>("javadoc") {
dependencies {
// without adding this dependency, javadoc fails:
// warning: unknown enum constant XmlAccessType.PROPERTY
// reason: class file for javax.xml.bind.annotation.XmlAccessType not found
// due to usage of org.apache.camel.model.RouteDefinition in CamelTracingService
// which has jaxb class-level annotations
compileOnly("javax.xml.bind:jaxb-api:2.3.1")
}
}
}

View File

@ -1,23 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.apache.dubbo"
module = "dubbo"
versions = "[2.7.0,3.0.0)"
}
}
dependencies {
implementation project(':instrumentation:apache-dubbo-2.7:library')
library "org.apache.dubbo:dubbo:2.7.0"
testImplementation project(':instrumentation:apache-dubbo-2.7:testing')
testLibrary "org.apache.dubbo:dubbo-config-api:2.7.0"
latestDepTestLibrary "org.apache.dubbo:dubbo:2.+"
latestDepTestLibrary "org.apache.dubbo:dubbo-config-api:2.+"
}

View File

@ -0,0 +1,23 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.apache.dubbo")
module.set("dubbo")
versions.set("[2.7.0,3.0.0)")
}
}
dependencies {
implementation(project(":instrumentation:apache-dubbo-2.7:library"))
library("org.apache.dubbo:dubbo:2.7.0")
testImplementation(project(":instrumentation:apache-dubbo-2.7:testing"))
testLibrary("org.apache.dubbo:dubbo-config-api:2.7.0")
latestDepTestLibrary("org.apache.dubbo:dubbo:2.+")
latestDepTestLibrary("org.apache.dubbo:dubbo-config-api:2.+")
}

View File

@ -1,13 +0,0 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
library "org.apache.dubbo:dubbo:2.7.0"
testImplementation project(':instrumentation:apache-dubbo-2.7:testing')
testLibrary "org.apache.dubbo:dubbo-config-api:2.7.0"
latestDepTestLibrary "org.apache.dubbo:dubbo:2.+"
latestDepTestLibrary "org.apache.dubbo:dubbo-config-api:2.+"
}

View File

@ -0,0 +1,13 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
library("org.apache.dubbo:dubbo:2.7.0")
testImplementation(project(":instrumentation:apache-dubbo-2.7:testing"))
testLibrary("org.apache.dubbo:dubbo-config-api:2.7.0")
latestDepTestLibrary("org.apache.dubbo:dubbo:2.+")
latestDepTestLibrary("org.apache.dubbo:dubbo-config-api:2.+")
}

View File

@ -1,19 +0,0 @@
plugins {
id("otel.java-conventions")
}
def apacheDubboVersion = '2.7.5'
dependencies {
api project(':testing-common')
api "org.apache.dubbo:dubbo:${apacheDubboVersion}"
api "org.apache.dubbo:dubbo-config-api:${apacheDubboVersion}"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "com.google.guava:guava"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
}

View File

@ -0,0 +1,19 @@
plugins {
id("otel.java-conventions")
}
val apacheDubboVersion = "2.7.5"
dependencies {
api(project(":testing-common"))
api("org.apache.dubbo:dubbo:${apacheDubboVersion}")
api("org.apache.dubbo:dubbo-config-api:${apacheDubboVersion}")
implementation("javax.annotation:javax.annotation-api:1.3.2")
implementation("com.google.guava:guava")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
}

View File

@ -4,15 +4,15 @@ plugins {
muzzle {
pass {
group = "org.apache.httpcomponents"
module = "httpasyncclient"
group.set("org.apache.httpcomponents")
module.set("httpasyncclient")
// 4.0 and 4.0.1 don't copy over the traceparent (etc) http headers on redirect
versions = "[4.1,)"
versions.set("[4.1,)")
// TODO implement a muzzle check so that 4.0.x (at least 4.0 and 4.0.1) do not get applied
// and then bring back assertInverse
}
}
dependencies {
library "org.apache.httpcomponents:httpasyncclient:4.1"
library("org.apache.httpcomponents:httpasyncclient:4.1")
}

View File

@ -1,17 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "commons-httpclient"
module = "commons-httpclient"
versions = "[2.0,4.0)"
assertInverse = true
}
}
dependencies {
library "commons-httpclient:commons-httpclient:2.0"
latestDepTestLibrary "commons-httpclient:commons-httpclient:3.+"
}

View File

@ -0,0 +1,17 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("commons-httpclient")
module.set("commons-httpclient")
versions.set("[2.0,4.0)")
assertInverse.set(true)
}
}
dependencies {
library("commons-httpclient:commons-httpclient:2.0")
latestDepTestLibrary("commons-httpclient:commons-httpclient:3.+")
}

View File

@ -1,28 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
fail {
group = "commons-httpclient"
module = "commons-httpclient"
versions = "[,4.0)"
}
pass {
group = "org.apache.httpcomponents"
module = "httpclient"
versions = "[4.0,)"
assertInverse = true
}
pass {
// We want to support the dropwizard clients too.
group = 'io.dropwizard'
module = 'dropwizard-client'
versions = "(,)"
assertInverse = true
}
}
dependencies {
library "org.apache.httpcomponents:httpclient:4.0"
}

View File

@ -0,0 +1,28 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
fail {
group.set("commons-httpclient")
module.set("commons-httpclient")
versions.set("[,4.0)")
}
pass {
group.set("org.apache.httpcomponents")
module.set("httpclient")
versions.set("[4.0,)")
assertInverse.set(true)
}
pass {
// We want to support the dropwizard clients too.
group.set("io.dropwizard")
module.set("dropwizard-client")
versions.set("(,)")
assertInverse.set(true)
}
}
dependencies {
library("org.apache.httpcomponents:httpclient:4.0")
}

View File

@ -1,15 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.apache.httpcomponents.client5"
module = "httpclient5"
versions = "[5.0,)"
}
}
dependencies {
library "org.apache.httpcomponents.client5:httpclient5:5.0"
}

View File

@ -0,0 +1,15 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.apache.httpcomponents.client5")
module.set("httpclient5")
versions.set("[5.0,)")
}
}
dependencies {
library("org.apache.httpcomponents.client5:httpclient5:5.0")
}

View File

@ -1,20 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.linecorp.armeria"
module = "armeria"
versions = "[1.3.0,)"
assertInverse = true
}
}
dependencies {
implementation project(':instrumentation:armeria-1.3:library')
library "com.linecorp.armeria:armeria:1.3.0"
testImplementation project(':instrumentation:armeria-1.3:testing')
}

View File

@ -0,0 +1,20 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.linecorp.armeria")
module.set("armeria")
versions.set("[1.3.0,)")
assertInverse.set(true)
}
}
dependencies {
implementation(project(":instrumentation:armeria-1.3:library"))
library("com.linecorp.armeria:armeria:1.3.0")
testImplementation(project(":instrumentation:armeria-1.3:testing"))
}

View File

@ -1,10 +0,0 @@
plugins {
id("otel.library-instrumentation")
id("net.ltgt.nullaway")
}
dependencies {
library "com.linecorp.armeria:armeria:1.3.0"
testImplementation project(':instrumentation:armeria-1.3:testing')
}

View File

@ -0,0 +1,10 @@
plugins {
id("otel.library-instrumentation")
id("net.ltgt.nullaway")
}
dependencies {
library("com.linecorp.armeria:armeria:1.3.0")
testImplementation(project(":instrumentation:armeria-1.3:testing"))
}

View File

@ -1,16 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
api "com.linecorp.armeria:armeria:1.3.0"
api "com.linecorp.armeria:armeria-junit4:1.3.0"
implementation "com.google.guava:guava"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
}

View File

@ -0,0 +1,16 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
api("com.linecorp.armeria:armeria:1.3.0")
api("com.linecorp.armeria:armeria-junit4:1.3.0")
implementation("com.google.guava:guava")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
}

View File

@ -1,16 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.ning"
module = "async-http-client"
versions = "[1.9.0,)"
assertInverse = true
}
}
dependencies {
library "com.ning:async-http-client:1.9.0"
}

View File

@ -0,0 +1,16 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.ning")
module.set("async-http-client")
versions.set("[1.9.0,)")
assertInverse.set(true)
}
}
dependencies {
library("com.ning:async-http-client:1.9.0")
}

View File

@ -1,41 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.asynchttpclient"
module = "async-http-client"
versions = "[2.0.0,)"
assertInverse = true
}
}
dependencies {
library "org.asynchttpclient:async-http-client:2.0.0"
compileOnly "com.google.auto.value:auto-value-annotations"
annotationProcessor "com.google.auto.value:auto-value"
testInstrumentation project(':instrumentation:netty:netty-4.0:javaagent')
}
otelJava {
//AHC uses Unsafe and so does not run on later java version
maxJavaVersionForTests = JavaVersion.VERSION_1_8
}
// async-http-client 2.0.0 does not work with Netty versions newer than this due to referencing an
// internal file.
if (!testLatestDeps) {
configurations.each {
it.resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
//specifying a fixed version for all libraries with io.netty' group
if (details.requested.group == 'io.netty' && details.requested.name != "netty-bom") {
details.useVersion "4.0.34.Final"
}
}
}
}
}

View File

@ -0,0 +1,43 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.asynchttpclient")
module.set("async-http-client")
versions.set("[2.0.0,)")
assertInverse.set(true)
}
}
dependencies {
library("org.asynchttpclient:async-http-client:2.0.0")
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
}
otelJava {
//AHC uses Unsafe and so does not run on later java version
maxJavaVersionForTests.set(JavaVersion.VERSION_1_8)
}
// async-http-client 2.0.0 does not work with Netty versions newer than this due to referencing an
// internal file.
if (!(findProperty("testLatestDeps") as Boolean)) {
configurations.configureEach {
if (!name.contains("muzzle")) {
resolutionStrategy {
eachDependency {
//specifying a fixed version for all libraries with io.netty' group
if (requested.group == "io.netty" && requested.name != "netty-bom") {
useVersion("4.0.34.Final")
}
}
}
}
}
}

View File

@ -1,26 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.amazonaws"
module = "aws-lambda-java-core"
versions = "[1.0.0,)"
extraDependency('com.amazonaws:aws-lambda-java-events:2.2.1')
extraDependency('com.amazonaws.serverless:aws-serverless-java-container-core:1.5.2')
}
}
dependencies {
implementation project(':instrumentation:aws-lambda-1.0:library')
library "com.amazonaws:aws-lambda-java-core:1.0.0"
// First version to includes support for SQSEvent, currently the most popular message queue used
// with lambda.
// NB: 2.2.0 includes a class called SQSEvent but isn't usable due to it returning private classes
// in public API.
library "com.amazonaws:aws-lambda-java-events:2.2.1"
testImplementation project(':instrumentation:aws-lambda-1.0:testing')
}

View File

@ -0,0 +1,26 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.amazonaws")
module.set("aws-lambda-java-core")
versions.set("[1.0.0,)")
extraDependency("com.amazonaws:aws-lambda-java-events:2.2.1")
extraDependency("com.amazonaws.serverless:aws-serverless-java-container-core:1.5.2")
}
}
dependencies {
implementation(project(":instrumentation:aws-lambda-1.0:library"))
library("com.amazonaws:aws-lambda-java-core:1.0.0")
// First version to includes support for SQSEvent, currently the most popular message queue used
// with lambda.
// NB: 2.2.0 includes a class called SQSEvent but isn't usable due to it returning private classes
// in public API.
library("com.amazonaws:aws-lambda-java-events:2.2.1")
testImplementation(project(":instrumentation:aws-lambda-1.0:testing"))
}

View File

@ -1,37 +0,0 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
compileOnly "io.opentelemetry:opentelemetry-sdk"
compileOnly "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure"
library "com.amazonaws:aws-lambda-java-core:1.0.0"
// First version to includes support for SQSEvent, currently the most popular message queue used
// with lambda.
// NB: 2.2.0 includes a class called SQSEvent but isn't usable due to it returning private classes
// in public API.
library "com.amazonaws:aws-lambda-java-events:2.2.1"
compileOnly(
'com.fasterxml.jackson.core:jackson-databind',
'commons-io:commons-io:2.2')
compileOnly "org.slf4j:slf4j-api"
implementation "io.opentelemetry:opentelemetry-extension-aws"
// 1.2.0 allows to get the function ARN
testLibrary "com.amazonaws:aws-lambda-java-core:1.2.0"
testImplementation(
'com.fasterxml.jackson.core:jackson-databind',
'commons-io:commons-io:2.2')
testImplementation "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure"
testImplementation "io.opentelemetry:opentelemetry-extension-trace-propagators"
testImplementation "com.google.guava:guava"
testImplementation project(':instrumentation:aws-lambda-1.0:testing')
testImplementation "org.mockito:mockito-core"
testImplementation "org.assertj:assertj-core"
}

View File

@ -0,0 +1,35 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
compileOnly("io.opentelemetry:opentelemetry-sdk")
compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
library("com.amazonaws:aws-lambda-java-core:1.0.0")
// First version to includes support for SQSEvent, currently the most popular message queue used
// with lambda.
// NB: 2.2.0 includes a class called SQSEvent but isn't usable due to it returning private classes
// in public API.
library("com.amazonaws:aws-lambda-java-events:2.2.1")
compileOnly("com.fasterxml.jackson.core:jackson-databind")
compileOnly("commons-io:commons-io:2.2")
compileOnly("org.slf4j:slf4j-api")
implementation("io.opentelemetry:opentelemetry-extension-aws")
// 1.2.0 allows to get the function ARN
testLibrary("com.amazonaws:aws-lambda-java-core:1.2.0")
testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation("commons-io:commons-io:2.2")
testImplementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
testImplementation("io.opentelemetry:opentelemetry-extension-trace-propagators")
testImplementation("com.google.guava:guava")
testImplementation(project(":instrumentation:aws-lambda-1.0:testing"))
testImplementation("org.mockito:mockito-core")
testImplementation("org.assertj:assertj-core")
}

View File

@ -1,17 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
api "com.amazonaws:aws-lambda-java-core:1.0.0"
api "com.amazonaws:aws-lambda-java-events:2.2.1"
implementation "com.google.guava:guava"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
implementation "com.github.stefanbirkner:system-lambda"
}

View File

@ -0,0 +1,17 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
api("com.amazonaws:aws-lambda-java-core:1.0.0")
api("com.amazonaws:aws-lambda-java-events:2.2.1")
implementation("com.google.guava:guava")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
implementation("com.github.stefanbirkner:system-lambda")
}

View File

@ -1,13 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
testImplementation project(':instrumentation:aws-sdk:aws-sdk-1.11:javaagent')
testImplementation "com.amazonaws:aws-java-sdk-core:1.11.0"
testImplementation "com.amazonaws:aws-java-sdk-sqs:1.11.106"
testImplementation "org.assertj:assertj-core"
}

View File

@ -0,0 +1,13 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-1.11:javaagent"))
testImplementation("com.amazonaws:aws-java-sdk-core:1.11.0")
testImplementation("com.amazonaws:aws-java-sdk-sqs:1.11.106")
testImplementation("org.assertj:assertj-core")
}

View File

@ -1,104 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("org.unbroken-dome.test-sets")
}
// compiling against 1.11.0, but instrumentation should work against 1.10.33 with varying effects,
// depending on the version's implementation. (i.e. DeleteOptionGroup may have less handlerCounts than
// expected in 1.11.84. Testing against 1.11.0 instead of 1.10.33 because the RequestHandler class
// used in testing is abstract in 1.10.33
// keeping base test version on 1.11.0 because RequestHandler2 is abstract in 1.10.33,
// therefore keeping base version as 1.11.0 even though the instrumentation probably
// is able to support up to 1.10.33
muzzle {
pass {
group = "com.amazonaws"
module = "aws-java-sdk-core"
versions = "[1.10.33,)"
assertInverse = true
}
}
testSets {
// Features used in test_1_11_106 (builder) is available since 1.11.84, but
// using 1.11.106 because of previous concerns with byte code differences
// in 1.11.106, also, the DeleteOptionGroup request generates more spans
// in 1.11.106 than 1.11.84.
// We test older version in separate test set to test newer version and latest deps in the 'default'
// test dir. Otherwise we get strange warnings in Idea.
test_before_1_11_106 {
filter {
// this is needed because "test.dependsOn test_before_1_11_106", and so without this,
// running a single test in the default test set will fail
setFailOnNoMatchingTests(false)
}
}
// We test SQS separately since we have special logic for it and want to make sure the presence of
// SQS on the classpath doesn't conflict with tests for usage of the core SDK. This only affects
// the agent.
testSqs
}
configurations {
test_before_1_11_106RuntimeClasspath {
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-s3:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-rds:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-ec2:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-kinesis:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-sqs:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-sns:1.11.0'
resolutionStrategy.force 'com.amazonaws:aws-java-sdk-dynamodb:1.11.0'
}
}
dependencies {
compileOnly "io.opentelemetry:opentelemetry-extension-aws"
implementation project(':instrumentation:aws-sdk:aws-sdk-1.11:library')
library "com.amazonaws:aws-java-sdk-core:1.11.0"
testLibrary "com.amazonaws:aws-java-sdk-s3:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-rds:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-ec2:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-kinesis:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-dynamodb:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-sns:1.11.106"
testImplementation project(':instrumentation:aws-sdk:aws-sdk-1.11:testing')
testSqsImplementation "com.amazonaws:aws-java-sdk-sqs:1.11.106"
// Include httpclient instrumentation for testing because it is a dependency for aws-sdk.
testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')
// needed for kinesis:
testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor"
// needed for SNS
testImplementation "org.testcontainers:localstack:${versions["org.testcontainers"]}"
// needed by S3
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-s3:1.11.0")
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-rds:1.11.0")
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-ec2:1.11.0")
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-kinesis:1.11.0")
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-dynamodb:1.11.0")
test_before_1_11_106Implementation("com.amazonaws:aws-java-sdk-sns:1.11.0")
}
test {
systemProperty "testLatestDeps", testLatestDeps
}
if (!testLatestDeps) {
check.dependsOn test_before_1_11_106, testSqs
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true"
}

View File

@ -0,0 +1,116 @@
plugins {
id("otel.javaagent-instrumentation")
id("org.unbroken-dome.test-sets")
}
// compiling against 1.11.0, but instrumentation should work against 1.10.33 with varying effects,
// depending on the version's implementation. (i.e. DeleteOptionGroup may have less handlerCounts than
// expected in 1.11.84. Testing against 1.11.0 instead of 1.10.33 because the RequestHandler class
// used in testing is abstract in 1.10.33
// keeping base test version on 1.11.0 because RequestHandler2 is abstract in 1.10.33,
// therefore keeping base version as 1.11.0 even though the instrumentation probably
// is able to support up to 1.10.33
muzzle {
pass {
group.set("com.amazonaws")
module.set("aws-java-sdk-core")
versions.set("[1.10.33,)")
assertInverse.set(true)
}
}
testSets {
// Features used in test_1_11_106 (builder) is available since 1.11.84, but
// using 1.11.106 because of previous concerns with byte code differences
// in 1.11.106, also, the DeleteOptionGroup request generates more spans
// in 1.11.106 than 1.11.84.
// We test older version in separate test set to test newer version and latest deps in the 'default'
// test dir. Otherwise we get strange warnings in Idea.
create("test_before_1_11_106")
// We test SQS separately since we have special logic for it and want to make sure the presence of
// SQS on the classpath doesn't conflict with tests for usage of the core SDK. This only affects
// the agent.
create("testSqs")
}
configurations {
named("test_before_1_11_106RuntimeClasspath") {
resolutionStrategy.force("com.amazonaws:aws-java-sdk-s3:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-rds:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-ec2:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-kinesis:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-sqs:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-sns:1.11.0")
resolutionStrategy.force("com.amazonaws:aws-java-sdk-dynamodb:1.11.0")
}
}
val versions: Map<String, String> by project
dependencies {
compileOnly("io.opentelemetry:opentelemetry-extension-aws")
implementation(project(":instrumentation:aws-sdk:aws-sdk-1.11:library"))
library("com.amazonaws:aws-java-sdk-core:1.11.0")
testLibrary("com.amazonaws:aws-java-sdk-s3:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-rds:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-ec2:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-kinesis:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-dynamodb:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-sns:1.11.106")
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-1.11:testing"))
add("testSqsImplementation", "com.amazonaws:aws-java-sdk-sqs:1.11.106")
// Include httpclient instrumentation for testing because it is a dependency for aws-sdk.
testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
// needed for kinesis:
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
// needed for SNS
testImplementation("org.testcontainers:localstack:${versions["org.testcontainers"]}")
// needed by S3
testImplementation("javax.xml.bind:jaxb-api:2.3.1")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-s3:1.11.0")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-rds:1.11.0")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-ec2:1.11.0")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-kinesis:1.11.0")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-dynamodb:1.11.0")
add("test_before_1_11_106Implementation", "com.amazonaws:aws-java-sdk-sns:1.11.0")
}
tasks {
val test_before_1_11_106 by existing(Test::class) {
filter {
// this is needed because "test.dependsOn test_before_1_11_106", and so without this,
// running a single test in the default test set will fail
setFailOnNoMatchingTests(false)
}
}
val testSqs by existing
if (!(findProperty("testLatestDeps") as Boolean)) {
named("check") {
dependsOn(test_before_1_11_106)
dependsOn(testSqs)
}
}
named<Test>("test") {
systemProperty("testLatestDeps", findProperty("testLatestDeps"))
}
withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
}
}

View File

@ -1,19 +0,0 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
implementation "io.opentelemetry:opentelemetry-extension-aws"
library "com.amazonaws:aws-java-sdk-core:1.11.0"
testImplementation project(':instrumentation:aws-sdk:aws-sdk-1.11:testing')
testLibrary "com.amazonaws:aws-java-sdk-s3:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-rds:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-ec2:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-kinesis:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-dynamodb:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-sns:1.11.106"
testLibrary "com.amazonaws:aws-java-sdk-sqs:1.11.106"
}

View File

@ -0,0 +1,19 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
implementation("io.opentelemetry:opentelemetry-extension-aws")
library("com.amazonaws:aws-java-sdk-core:1.11.0")
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-1.11:testing"))
testLibrary("com.amazonaws:aws-java-sdk-s3:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-rds:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-ec2:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-kinesis:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-dynamodb:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-sns:1.11.106")
testLibrary("com.amazonaws:aws-java-sdk-sqs:1.11.106")
}

View File

@ -1,26 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
api "com.amazonaws:aws-java-sdk-core:1.11.0"
compileOnly "com.amazonaws:aws-java-sdk-s3:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-rds:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-ec2:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-kinesis:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-dynamodb:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-sns:1.11.106"
compileOnly "com.amazonaws:aws-java-sdk-sqs:1.11.106"
// needed for SQS - using emq directly as localstack references emq v0.15.7 ie WITHOUT AWS trace header propagation
implementation "org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0"
implementation "com.google.guava:guava"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
}

View File

@ -0,0 +1,26 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
api("com.amazonaws:aws-java-sdk-core:1.11.0")
compileOnly("com.amazonaws:aws-java-sdk-s3:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-rds:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-ec2:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-kinesis:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-dynamodb:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-sns:1.11.106")
compileOnly("com.amazonaws:aws-java-sdk-sqs:1.11.106")
// needed for SQS - using emq directly as localstack references emq v0.15.7 ie WITHOUT AWS trace header propagation
implementation("org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0")
implementation("com.google.guava:guava")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
}

View File

@ -1,30 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "software.amazon.awssdk"
module = "aws-core"
versions = "[2.2.0,)"
// Used by all SDK services, the only case it isn't is an SDK extension such as a custom HTTP
// client, which is not target of instrumentation anyways.
extraDependency "software.amazon.awssdk:protocol-core"
}
}
dependencies {
implementation project(':instrumentation:aws-sdk:aws-sdk-2.2:library')
library "software.amazon.awssdk:aws-core:2.2.0"
testImplementation project(':instrumentation:aws-sdk:aws-sdk-2.2:testing')
// Make sure these don't add HTTP headers
testImplementation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')
testImplementation project(':instrumentation:netty:netty-4.1:javaagent')
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true"
}

View File

@ -0,0 +1,30 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("software.amazon.awssdk")
module.set("aws-core")
versions.set("[2.2.0,)")
// Used by all SDK services, the only case it isn't is an SDK extension such as a custom HTTP
// client, which is not target of instrumentation anyways.
extraDependency("software.amazon.awssdk:protocol-core")
}
}
dependencies {
implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:library"))
library("software.amazon.awssdk:aws-core:2.2.0")
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
// Make sure these don't add HTTP headers
testImplementation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
testImplementation(project(":instrumentation:netty:netty-4.1:javaagent"))
}
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
}

View File

@ -1,19 +0,0 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
implementation "io.opentelemetry:opentelemetry-extension-aws"
library "software.amazon.awssdk:aws-core:2.2.0"
library "software.amazon.awssdk:aws-json-protocol:2.2.0"
testImplementation project(':instrumentation:aws-sdk:aws-sdk-2.2:testing')
testImplementation "org.assertj:assertj-core"
testImplementation "org.mockito:mockito-core"
}
test {
systemProperty "otel.instrumentation.aws-sdk.experimental-span-attributes", true
}

View File

@ -0,0 +1,21 @@
plugins {
id("otel.library-instrumentation")
}
dependencies {
implementation("io.opentelemetry:opentelemetry-extension-aws")
library("software.amazon.awssdk:aws-core:2.2.0")
library("software.amazon.awssdk:aws-json-protocol:2.2.0")
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.mockito:mockito-core")
}
tasks {
named<Test>("test") {
systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", true)
}
}

View File

@ -1,21 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
api "software.amazon.awssdk:apache-client:2.2.0"
api "software.amazon.awssdk:s3:2.2.0"
api "software.amazon.awssdk:rds:2.2.0"
api "software.amazon.awssdk:ec2:2.2.0"
api "software.amazon.awssdk:sqs:2.2.0"
api "software.amazon.awssdk:dynamodb:2.2.0"
api "software.amazon.awssdk:kinesis:2.2.0"
implementation "com.google.guava:guava"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
}

View File

@ -0,0 +1,21 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
api("software.amazon.awssdk:apache-client:2.2.0")
api("software.amazon.awssdk:s3:2.2.0")
api("software.amazon.awssdk:rds:2.2.0")
api("software.amazon.awssdk:ec2:2.2.0")
api("software.amazon.awssdk:sqs:2.2.0")
api("software.amazon.awssdk:dynamodb:2.2.0")
api("software.amazon.awssdk:kinesis:2.2.0")
implementation("com.google.guava:guava")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
}

View File

@ -1,43 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
ext {
cassandraDriverTestVersions = "[3.0,4.0)"
}
muzzle {
pass {
group = "com.datastax.cassandra"
module = "cassandra-driver-core"
versions = cassandraDriverTestVersions
assertInverse = true
}
// Making sure that instrumentation works with recent versions of Guava which removed method
// Futures::transform(input, function) in favor of Futures::transform(input, function, executor)
pass {
name = "Newest versions of Guava"
group = "com.datastax.cassandra"
module = "cassandra-driver-core"
versions = cassandraDriverTestVersions
// While com.datastax.cassandra uses old versions of Guava, users may depends themselves on newer versions of Guava
extraDependency "com.google.guava:guava:27.0-jre"
}
}
dependencies {
library "com.datastax.cassandra:cassandra-driver-core:3.0.0"
compileOnly "com.google.auto.value:auto-value-annotations"
annotationProcessor "com.google.auto.value:auto-value"
testLibrary "com.datastax.cassandra:cassandra-driver-core:3.2.0"
testInstrumentation project(':instrumentation:guava-10.0:javaagent')
latestDepTestLibrary "com.datastax.cassandra:cassandra-driver-core:3.+"
}
// Requires old Guava. Can't use enforcedPlatform since predates BOM
configurations.testRuntimeClasspath.resolutionStrategy.force "com.google.guava:guava:19.0"

View File

@ -0,0 +1,41 @@
plugins {
id("otel.javaagent-instrumentation")
}
val cassandraDriverTestVersions = "[3.0,4.0)"
muzzle {
pass {
group.set("com.datastax.cassandra")
module.set("cassandra-driver-core")
versions.set(cassandraDriverTestVersions)
assertInverse.set(true)
}
// Making sure that instrumentation works with recent versions of Guava which removed method
// Futures::transform(input, function) in favor of Futures::transform(input, function, executor)
pass {
name.set("Newest versions of Guava")
group.set("com.datastax.cassandra")
module.set("cassandra-driver-core")
versions.set(cassandraDriverTestVersions)
// While com.datastax.cassandra uses old versions of Guava, users may depends themselves on newer versions of Guava
extraDependency("com.google.guava:guava:27.0-jre")
}
}
dependencies {
library("com.datastax.cassandra:cassandra-driver-core:3.0.0")
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
testLibrary("com.datastax.cassandra:cassandra-driver-core:3.2.0")
testInstrumentation(project(":instrumentation:guava-10.0:javaagent"))
latestDepTestLibrary("com.datastax.cassandra:cassandra-driver-core:3.+")
}
// Requires old Guava. Can't use enforcedPlatform since predates BOM
configurations.testRuntimeClasspath.resolutionStrategy.force("com.google.guava:guava:19.0")

View File

@ -1,21 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.datastax.oss"
module = "java-driver-core"
versions = "[4.0,)"
assertInverse = true
}
}
dependencies {
library "com.datastax.oss:java-driver-core:4.0.0"
compileOnly "com.google.auto.value:auto-value-annotations"
annotationProcessor "com.google.auto.value:auto-value"
latestDepTestLibrary "com.datastax.oss:java-driver-core:4.+"
}

View File

@ -0,0 +1,21 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.datastax.oss")
module.set("java-driver-core")
versions.set("[4.0,)")
assertInverse.set(true)
}
}
dependencies {
library("com.datastax.oss:java-driver-core:4.0.0")
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
latestDepTestLibrary("com.datastax.oss:java-driver-core:4.+")
}

View File

@ -1,13 +0,0 @@
plugins {
id("otel.javaagent-testing")
}
dependencies {
testLibrary "org.jboss.weld:weld-core:2.3.0.Final"
testLibrary "org.jboss.weld.se:weld-se:2.3.0.Final"
testLibrary "org.jboss.weld.se:weld-se-core:2.3.0.Final"
latestDepTestLibrary "org.jboss.weld:weld-core:2.+"
latestDepTestLibrary "org.jboss.weld.se:weld-se:2.+"
latestDepTestLibrary "org.jboss.weld.se:weld-se-core:2.+"
}

View File

@ -0,0 +1,13 @@
plugins {
id("otel.javaagent-testing")
}
dependencies {
testLibrary("org.jboss.weld:weld-core:2.3.0.Final")
testLibrary("org.jboss.weld.se:weld-se:2.3.0.Final")
testLibrary("org.jboss.weld.se:weld-se-core:2.3.0.Final")
latestDepTestLibrary("org.jboss.weld:weld-core:2.+")
latestDepTestLibrary("org.jboss.weld.se:weld-se:2.+")
latestDepTestLibrary("org.jboss.weld.se:weld-se-core:2.+")
}

View File

@ -1,12 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation "org.codehaus.groovy:groovy-all"
testImplementation "org.spockframework:spock-core"
testImplementation project(':instrumentation-api')
testImplementation project(':instrumentation:couchbase:couchbase-2.0:javaagent')
testImplementation "com.couchbase.client:java-client:2.5.0"
}

View File

@ -0,0 +1,12 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation("org.codehaus.groovy:groovy-all")
testImplementation("org.spockframework:spock-core")
testImplementation(project(":instrumentation-api"))
testImplementation(project(":instrumentation:couchbase:couchbase-2.0:javaagent"))
testImplementation("com.couchbase.client:java-client:2.5.0")
}

View File

@ -1,39 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
// Version 2.7.5 and 2.7.8 were not released properly and muzzle cannot test against it causing failure.
// So we have to skip them resulting in this verbose setup.
pass {
group = 'com.couchbase.client'
module = 'java-client'
versions = "[2.0.0,2.7.5)"
}
pass {
group = 'com.couchbase.client'
module = 'java-client'
versions = "[2.7.6,2.7.8)"
}
pass {
group = 'com.couchbase.client'
module = 'java-client'
versions = "[2.7.9,3.0.0)"
}
fail {
group = 'com.couchbase.client'
module = 'couchbase-client'
versions = "(,)"
}
}
dependencies {
implementation project(':instrumentation:rxjava:rxjava-1.0:library')
library "com.couchbase.client:java-client:2.0.0"
testImplementation project(':instrumentation:couchbase:couchbase-testing')
latestDepTestLibrary "org.springframework.data:spring-data-couchbase:3.+"
latestDepTestLibrary "com.couchbase.client:java-client:2.+"
}

View File

@ -0,0 +1,39 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
// Version 2.7.5 and 2.7.8 were not released properly and muzzle cannot test against it causing failure.
// So we have to skip them resulting in this verbose setup.
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[2.0.0,2.7.5)")
}
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[2.7.6,2.7.8)")
}
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[2.7.9,3.0.0)")
}
fail {
group.set("com.couchbase.client")
module.set("couchbase-client")
versions.set("(,)")
}
}
dependencies {
implementation(project(":instrumentation:rxjava:rxjava-1.0:library"))
library("com.couchbase.client:java-client:2.0.0")
testImplementation(project(":instrumentation:couchbase:couchbase-testing"))
latestDepTestLibrary("org.springframework.data:spring-data-couchbase:3.+")
latestDepTestLibrary("com.couchbase.client:java-client:2.+")
}

View File

@ -1,39 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = 'com.couchbase.client'
module = 'java-client'
versions = "[2.6.0,3)"
// these versions were released as ".bundle" instead of ".jar"
skip('2.7.5', '2.7.8')
assertInverse = true
}
fail {
group = 'com.couchbase.client'
module = 'couchbase-client'
versions = "(,)"
}
}
dependencies {
implementation project(':instrumentation:rxjava:rxjava-1.0:library')
library "com.couchbase.client:java-client:2.6.0"
testInstrumentation project(':instrumentation:couchbase:couchbase-2.0:javaagent')
testImplementation project(':instrumentation:couchbase:couchbase-testing')
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.+"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.couchbase.experimental-span-attributes=true"
}

View File

@ -0,0 +1,39 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[2.6.0,3)")
// these versions were released as ".bundle" instead of ".jar"
skip("2.7.5", "2.7.8")
assertInverse.set(true)
}
fail {
group.set("com.couchbase.client")
module.set("couchbase-client")
versions.set("(,)")
}
}
dependencies {
implementation(project(":instrumentation:rxjava:rxjava-1.0:library"))
library("com.couchbase.client:java-client:2.6.0")
testInstrumentation(project(":instrumentation:couchbase:couchbase-2.0:javaagent"))
testImplementation(project(":instrumentation:couchbase:couchbase-testing"))
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.+")
}
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.couchbase.experimental-span-attributes=true")
}

View File

@ -1,26 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.couchbase.client"
module = "java-client"
versions = "[3.1.6,)"
// these versions were released as ".bundle" instead of ".jar"
skip('2.7.5', '2.7.8')
assertInverse = true
}
}
dependencies {
implementation("com.couchbase.client:tracing-opentelemetry:0.3.6") {
exclude(group: "com.couchbase.client", module: "core-io")
}
library "com.couchbase.client:core-io:2.1.6"
testLibrary "com.couchbase.client:java-client:3.1.6"
testImplementation group: "org.testcontainers", name: "couchbase", version: versions["org.testcontainers"]
}

View File

@ -0,0 +1,28 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[3.1.6,)")
// these versions were released as ".bundle" instead of ".jar"
skip("2.7.5", "2.7.8")
assertInverse.set(true)
}
}
val versions: Map<String, String> by project
dependencies {
implementation("com.couchbase.client:tracing-opentelemetry:0.3.6") {
exclude("com.couchbase.client", "core-io")
}
library("com.couchbase.client:core-io:2.1.6")
testLibrary("com.couchbase.client:java-client:3.1.6")
testImplementation("org.testcontainers:couchbase:${versions["org.testcontainers"]}")
}

View File

@ -1,29 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "com.couchbase.client"
module = "java-client"
versions = "[3.1,3.1.6)"
// these versions were released as ".bundle" instead of ".jar"
skip('2.7.5', '2.7.8')
assertInverse = true
}
}
dependencies {
implementation("com.couchbase.client:tracing-opentelemetry:0.3.3") {
exclude(group: "com.couchbase.client", module: "core-io")
}
library "com.couchbase.client:core-io:2.1.0"
testLibrary "com.couchbase.client:java-client:3.1.0"
testImplementation group: "org.testcontainers", name: "couchbase", version: versions["org.testcontainers"]
latestDepTestLibrary "com.couchbase.client:java-client:3.1.5"
latestDepTestLibrary "com.couchbase.client:core-io:2.1.5"
}

View File

@ -0,0 +1,31 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("com.couchbase.client")
module.set("java-client")
versions.set("[3.1,3.1.6)")
// these versions were released as ".bundle" instead of ".jar"
skip("2.7.5", "2.7.8")
assertInverse.set(true)
}
}
val versions: Map<String, String> by project
dependencies {
implementation("com.couchbase.client:tracing-opentelemetry:0.3.3") {
exclude("com.couchbase.client", "core-io")
}
library("com.couchbase.client:core-io:2.1.0")
testLibrary("com.couchbase.client:java-client:3.1.0")
testImplementation("org.testcontainers:couchbase:${versions["org.testcontainers"]}")
latestDepTestLibrary("com.couchbase.client:java-client:3.1.5")
latestDepTestLibrary("com.couchbase.client:core-io:2.1.5")
}

View File

@ -1,16 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api project(':testing-common')
api "com.couchbase.mock:CouchbaseMock:1.5.19"
// Earliest version that seems to allow queries with CouchbaseMock:
api "com.couchbase.client:java-client:2.5.0"
api "org.springframework.data:spring-data-couchbase:2.0.0.RELEASE"
implementation "org.codehaus.groovy:groovy-all"
implementation "io.opentelemetry:opentelemetry-api"
implementation "org.spockframework:spock-core"
}

View File

@ -0,0 +1,16 @@
plugins {
id("otel.java-conventions")
}
dependencies {
api(project(":testing-common"))
api("com.couchbase.mock:CouchbaseMock:1.5.19")
// Earliest version that seems to allow queries with CouchbaseMock:
api("com.couchbase.client:java-client:2.5.0")
api("org.springframework.data:spring-data-couchbase:2.0.0.RELEASE")
implementation("org.codehaus.groovy:groovy-all")
implementation("io.opentelemetry:opentelemetry-api")
implementation("org.spockframework:spock-core")
}

View File

@ -1,16 +0,0 @@
plugins {
id("otel.javaagent-testing")
}
dependencies {
testInstrumentation project(':instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-jersey-2.0:javaagent')
testInstrumentation project(':instrumentation:servlet:servlet-3.0:javaagent')
// First version with DropwizardTestSupport:
testImplementation "io.dropwizard:dropwizard-testing:0.8.0"
testImplementation "javax.xml.bind:jaxb-api:2.2.3"
testImplementation "com.fasterxml.jackson.module:jackson-module-afterburner"
}
// Requires old Guava. Can't use enforcedPlatform since predates BOM
configurations.testRuntimeClasspath.resolutionStrategy.force "com.google.guava:guava:19.0"

View File

@ -0,0 +1,16 @@
plugins {
id("otel.javaagent-testing")
}
dependencies {
testInstrumentation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-jersey-2.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
// First version with DropwizardTestSupport:
testImplementation("io.dropwizard:dropwizard-testing:0.8.0")
testImplementation("javax.xml.bind:jaxb-api:2.2.3")
testImplementation("com.fasterxml.jackson.module:jackson-module-afterburner")
}
// Requires old Guava. Can't use enforcedPlatform since predates BOM
configurations.testRuntimeClasspath.resolutionStrategy.force("com.google.guava:guava:19.0")

View File

@ -1,18 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = 'io.dropwizard'
module = 'dropwizard-views'
versions = "(,)"
}
}
dependencies {
compileOnly "io.dropwizard:dropwizard-views:0.7.0"
testImplementation "io.dropwizard:dropwizard-views-freemarker:0.7.0"
testImplementation "io.dropwizard:dropwizard-views-mustache:0.7.0"
}

View File

@ -0,0 +1,18 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("io.dropwizard")
module.set("dropwizard-views")
versions.set("(,)")
}
}
dependencies {
compileOnly("io.dropwizard:dropwizard-views:0.7.0")
testImplementation("io.dropwizard:dropwizard-views-freemarker:0.7.0")
testImplementation("io.dropwizard:dropwizard-views-mustache:0.7.0")
}

View File

@ -1,40 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("org.unbroken-dome.test-sets")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "rest"
versions = "[5.0,6.4)"
assertInverse = true
}
pass {
group = "org.elasticsearch.client"
module = "elasticsearch-rest-client"
versions = "[5.0,6.4)"
}
}
dependencies {
compileOnly "org.elasticsearch.client:rest:5.0.0"
implementation project(':instrumentation:elasticsearch:elasticsearch-rest-common:library')
testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
testImplementation "org.testcontainers:elasticsearch:${versions["org.testcontainers"]}"
testLibrary "org.elasticsearch.client:rest:5.0.0"
latestDepTestLibrary "org.elasticsearch.client:elasticsearch-rest-client:6.3.+"
}
tasks.withType(Test).configureEach {
systemProperty "testLatestDeps", testLatestDeps
}

View File

@ -0,0 +1,44 @@
plugins {
id("otel.javaagent-instrumentation")
id("org.unbroken-dome.test-sets")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("rest")
versions.set("[5.0,6.4)")
assertInverse.set(true)
}
pass {
group.set("org.elasticsearch.client")
module.set("elasticsearch-rest-client")
versions.set("[5.0,6.4)")
}
}
val versions: Map<String, String> by project
dependencies {
compileOnly("org.elasticsearch.client:rest:5.0.0")
implementation(project(":instrumentation:elasticsearch:elasticsearch-rest-common:library"))
testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
testImplementation("org.testcontainers:elasticsearch:${versions["org.testcontainers"]}")
testLibrary("org.elasticsearch.client:rest:5.0.0")
latestDepTestLibrary("org.elasticsearch.client:elasticsearch-rest-client:6.3.+")
}
tasks {
withType<Test>().configureEach {
systemProperty("testLatestDeps", findProperty("testLatestDeps"))
}
}

View File

@ -1,38 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "elasticsearch-rest-client"
versions = "[6.4,7.0)"
assertInverse = true
}
fail {
group = "org.elasticsearch.client"
module = "rest"
versions = "(,)"
}
}
dependencies {
library "org.elasticsearch.client:elasticsearch-rest-client:6.4.0"
implementation project(':instrumentation:elasticsearch:elasticsearch-rest-common:library')
testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
//TODO: review the following claim, we are not using embedded ES anymore
// Netty is used, but it adds complexity to the tests since we're using embedded ES.
//testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
testImplementation "org.testcontainers:elasticsearch:${versions["org.testcontainers"]}"
testLibrary "org.elasticsearch.client:elasticsearch-rest-client:6.4.0"
latestDepTestLibrary "org.elasticsearch.client:elasticsearch-rest-client:6.+"
}

View File

@ -0,0 +1,40 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("elasticsearch-rest-client")
versions.set("[6.4,7.0)")
assertInverse.set(true)
}
fail {
group.set("org.elasticsearch.client")
module.set("rest")
versions.set("(,)")
}
}
val versions: Map<String, String> by project
dependencies {
library("org.elasticsearch.client:elasticsearch-rest-client:6.4.0")
implementation(project(":instrumentation:elasticsearch:elasticsearch-rest-common:library"))
testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
//TODO: review the following claim, we are not using embedded ES anymore
// Netty is used, but it adds complexity to the tests since we're using embedded ES.
//testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
testImplementation("org.testcontainers:elasticsearch:${versions["org.testcontainers"]}")
testLibrary("org.elasticsearch.client:elasticsearch-rest-client:6.4.0")
latestDepTestLibrary("org.elasticsearch.client:elasticsearch-rest-client:6.+")
}

View File

@ -1,35 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "elasticsearch-rest-client"
versions = "[7.0,)"
assertInverse = true
}
fail {
group = "org.elasticsearch.client"
module = "rest"
versions = "(,)"
}
}
dependencies {
library "org.elasticsearch.client:elasticsearch-rest-client:7.0.0"
implementation project(':instrumentation:elasticsearch:elasticsearch-rest-common:library')
testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
//TODO: review the following claim, we are not using embedded ES anymore
// Netty is used, but it adds complexity to the tests since we're using embedded ES.
//testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
testImplementation "org.testcontainers:elasticsearch:${versions["org.testcontainers"]}"
}

View File

@ -0,0 +1,37 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("elasticsearch-rest-client")
versions.set("[7.0,)")
assertInverse.set(true)
}
fail {
group.set("org.elasticsearch.client")
module.set("rest")
versions.set("(,)")
}
}
val versions: Map<String, String> by project
dependencies {
library("org.elasticsearch.client:elasticsearch-rest-client:7.0.0")
implementation(project(":instrumentation:elasticsearch:elasticsearch-rest-common:library"))
testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
//TODO: review the following claim, we are not using embedded ES anymore
// Netty is used, but it adds complexity to the tests since we're using embedded ES.
//testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
testImplementation("org.testcontainers:elasticsearch:${versions["org.testcontainers"]}")
}

View File

@ -3,5 +3,5 @@ plugins {
}
dependencies {
compileOnly "org.elasticsearch.client:rest:5.0.0"
compileOnly("org.elasticsearch.client:rest:5.0.0")
}

View File

@ -1,46 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "transport"
versions = "[5.0.0,5.3.0)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip('7.11.0')
assertInverse = true
}
pass {
group = "org.elasticsearch"
module = "elasticsearch"
versions = "[5.0.0,5.3.0)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip('7.11.0')
assertInverse = true
}
}
dependencies {
compileOnly "org.elasticsearch.client:transport:5.0.0"
implementation project(':instrumentation:elasticsearch:elasticsearch-transport-common:library')
// Ensure no cross interference
testInstrumentation project(':instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
testImplementation "org.elasticsearch.plugin:transport-netty3-client:5.0.0"
testImplementation "org.elasticsearch.client:transport:5.0.0"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true"
}

View File

@ -0,0 +1,46 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("transport")
versions.set("[5.0.0,5.3.0)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip("7.11.0")
assertInverse.set(true)
}
pass {
group.set("org.elasticsearch")
module.set("elasticsearch")
versions.set("[5.0.0,5.3.0)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip("7.11.0")
assertInverse.set(true)
}
}
dependencies {
compileOnly("org.elasticsearch.client:transport:5.0.0")
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
// Ensure no cross interference
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
testImplementation("org.elasticsearch.plugin:transport-netty3-client:5.0.0")
testImplementation("org.elasticsearch.client:transport:5.0.0")
}
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
}

View File

@ -1,58 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "transport"
versions = "[5.3.0,6.0.0)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip('7.11.0')
assertInverse = true
}
pass {
group = "org.elasticsearch"
module = "elasticsearch"
versions = "[5.3.0,6.0.0)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch-plugin-classloader:7.11.0
// which does not exist
skip('7.11.0')
assertInverse = true
}
}
dependencies {
compileOnly("org.elasticsearch.client:transport:5.3.0") {
transitive = false
}
compileOnly("org.elasticsearch:elasticsearch:5.3.0") {
// We don't need all its transitive dependencies when compiling and run tests against 5.5.0
transitive = false
}
implementation project(':instrumentation:elasticsearch:elasticsearch-transport-common:library')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
testInstrumentation project(':instrumentation:spring:spring-data-1.8:javaagent')
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
// Unfortunately spring-data-elasticsearch requires 5.5.0
testLibrary "org.elasticsearch.client:transport:5.5.0"
testLibrary "org.elasticsearch.plugin:transport-netty3-client:5.3.0"
testLibrary "org.springframework.data:spring-data-elasticsearch:3.0.0.RELEASE"
latestDepTestLibrary "org.elasticsearch.plugin:transport-netty3-client:5.+"
latestDepTestLibrary "org.elasticsearch.client:transport:5.+"
latestDepTestLibrary "org.springframework.data:spring-data-elasticsearch:3.0.+"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true"
}

View File

@ -0,0 +1,58 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("transport")
versions.set("[5.3.0,6.0.0)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip("7.11.0")
assertInverse.set(true)
}
pass {
group.set("org.elasticsearch")
module.set("elasticsearch")
versions.set("[5.3.0,6.0.0)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch-plugin-classloader:7.11.0
// which does not exist
skip("7.11.0")
assertInverse.set(true)
}
}
dependencies {
compileOnly("org.elasticsearch.client:transport:5.3.0") {
isTransitive = false
}
compileOnly("org.elasticsearch:elasticsearch:5.3.0") {
// We don't need all its transitive dependencies when compiling and run tests against 5.5.0
isTransitive = false
}
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:spring:spring-data-1.8:javaagent"))
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
// Unfortunately spring-data-elasticsearch requires 5.5.0
testLibrary("org.elasticsearch.client:transport:5.5.0")
testLibrary("org.elasticsearch.plugin:transport-netty3-client:5.3.0")
testLibrary("org.springframework.data:spring-data-elasticsearch:3.0.0.RELEASE")
latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.+")
latestDepTestLibrary("org.elasticsearch.client:transport:5.+")
latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+")
}
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
}

View File

@ -1,45 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.elasticsearch.client"
module = "transport"
versions = "[6.0.0,)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip('7.11.0')
assertInverse = true
}
pass {
group = "org.elasticsearch"
module = "elasticsearch"
versions = "[6.0.0,)"
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip('7.11.0')
assertInverse = true
}
}
dependencies {
library "org.elasticsearch.client:transport:6.0.0"
implementation project(':instrumentation:elasticsearch:elasticsearch-transport-common:library')
// Ensure no cross interference
testInstrumentation project(':instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent')
testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
testLibrary "org.elasticsearch.plugin:transport-netty4-client:6.0.0"
testImplementation "org.apache.logging.log4j:log4j-core:2.11.0"
testImplementation "org.apache.logging.log4j:log4j-api:2.11.0"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true"
}

View File

@ -0,0 +1,45 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("org.elasticsearch.client")
module.set("transport")
versions.set("[6.0.0,)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip("7.11.0")
assertInverse.set(true)
}
pass {
group.set("org.elasticsearch")
module.set("elasticsearch")
versions.set("[6.0.0,)")
// version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
// org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
skip("7.11.0")
assertInverse.set(true)
}
}
dependencies {
library("org.elasticsearch.client:transport:6.0.0")
implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
// Ensure no cross interference
testInstrumentation(project(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent"))
testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testLibrary("org.elasticsearch.plugin:transport-netty4-client:6.0.0")
testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
}
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
}

View File

@ -1,14 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
coreJdk()
}
}
tasks.withType(Test).configureEach {
jvmArgs "-Dotel.instrumentation.executors.include=ExecutorInstrumentationTest\$CustomThreadPoolExecutor"
jvmArgs "-Djava.awt.headless=true"
}

View File

@ -0,0 +1,14 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
coreJdk()
}
}
tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.executors.include=ExecutorInstrumentationTest\$CustomThreadPoolExecutor")
jvmArgs("-Djava.awt.headless=true")
}

View File

@ -1,11 +0,0 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation project(':instrumentation-api')
testImplementation project(':javaagent-extension-api')
testImplementation project(':javaagent-tooling')
testImplementation "net.bytebuddy:byte-buddy"
testImplementation project(':instrumentation:external-annotations:javaagent')
}

View File

@ -0,0 +1,11 @@
plugins {
id("otel.java-conventions")
}
dependencies {
testImplementation(project(":instrumentation-api"))
testImplementation(project(":javaagent-extension-api"))
testImplementation(project(":javaagent-tooling"))
testImplementation("net.bytebuddy:byte-buddy")
testImplementation(project(":instrumentation:external-annotations:javaagent"))
}

View File

@ -1,48 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
coreJdk = true
}
}
dependencies {
compileOnly project(':javaagent-tooling')
testImplementation "com.newrelic.agent.java:newrelic-api:5.14.0"
testImplementation("io.opentracing.contrib.dropwizard:dropwizard-opentracing:0.2.2") {
transitive = false
}
testImplementation "com.signalfx.public:signalfx-trace-api:0.48.0-sfx1"
//Old and new versions of kamon use different packages for Trace annotation
testImplementation("io.kamon:kamon-annotation_2.11:0.6.7") {
transitive = false
}
testImplementation "io.kamon:kamon-annotation-api:2.1.4"
testImplementation "com.appoptics.agent.java:appoptics-sdk:6.20.1"
testImplementation "com.tracelytics.agent.java:tracelytics-api:5.0.10"
testImplementation("org.springframework.cloud:spring-cloud-sleuth-core:2.2.4.RELEASE") {
transitive = false
}
}
test {
filter {
excludeTestsMatching 'ConfiguredTraceAnnotationsTest'
excludeTestsMatching 'TracedMethodsExclusionTest'
}
}
test.finalizedBy(tasks.register("testIncludeProperty", Test) {
filter {
includeTestsMatching 'ConfiguredTraceAnnotationsTest'
}
jvmArgs "-Dotel.instrumentation.external-annotations.include=package.Class\$Name;OuterClass\$InterestingMethod"
})
test.finalizedBy(tasks.register("testExcludeMethodsProperty", Test) {
filter {
includeTestsMatching 'TracedMethodsExclusionTest'
}
jvmArgs "-Dotel.instrumentation.external-annotations.exclude-methods=TracedMethodsExclusionTest\$TestClass[excluded,annotatedButExcluded]"
})

View File

@ -0,0 +1,53 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
coreJdk.set(true)
}
}
dependencies {
compileOnly(project(":javaagent-tooling"))
testImplementation("com.newrelic.agent.java:newrelic-api:5.14.0")
testImplementation("io.opentracing.contrib.dropwizard:dropwizard-opentracing:0.2.2") {
isTransitive = false
}
testImplementation("com.signalfx.public:signalfx-trace-api:0.48.0-sfx1")
//Old and new versions of kamon use different packages for Trace annotation
testImplementation("io.kamon:kamon-annotation_2.11:0.6.7") {
isTransitive = false
}
testImplementation("io.kamon:kamon-annotation-api:2.1.4")
testImplementation("com.appoptics.agent.java:appoptics-sdk:6.20.1")
testImplementation("com.tracelytics.agent.java:tracelytics-api:5.0.10")
testImplementation("org.springframework.cloud:spring-cloud-sleuth-core:2.2.4.RELEASE") {
isTransitive = false
}
}
tasks {
val testIncludeProperty by registering(Test::class) {
filter {
includeTestsMatching("ConfiguredTraceAnnotationsTest")
}
jvmArgs("-Dotel.instrumentation.external-annotations.include=package.Class\$Name;OuterClass\$InterestingMethod")
}
val testExcludeMethodsProperty by registering(Test::class) {
filter {
includeTestsMatching("TracedMethodsExclusionTest")
}
jvmArgs("-Dotel.instrumentation.external-annotations.exclude-methods=TracedMethodsExclusionTest\$TestClass[excluded,annotatedButExcluded]")
}
named<Test>("test") {
dependsOn(testIncludeProperty)
filter {
excludeTestsMatching("ConfiguredTraceAnnotationsTest")
excludeTestsMatching("TracedMethodsExclusionTest")
}
}
}

View File

@ -1,62 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
id("org.unbroken-dome.test-sets")
}
testSets {
// We need separate test sources to compile against latest Finatra.
latestDepTest
}
muzzle {
// There are some weird library issues below 2.9 so can't assert inverse
pass {
group = 'com.twitter'
module = 'finatra-http_2.11'
versions = '[2.9.0,]'
excludeDependency "io.netty:netty-transport-native-epoll"
}
pass {
group = 'com.twitter'
module = 'finatra-http_2.12'
versions = '[2.9.0,]'
excludeDependency "io.netty:netty-transport-native-epoll"
}
}
dependencies {
// TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
// here.
compileOnly "com.twitter:finatra-http_2.11:2.9.0"
testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')
if (!testLatestDeps) {
// Requires old version of Jackson
testImplementation enforcedPlatform("com.fasterxml.jackson:jackson-bom:2.9.10")
}
testImplementation("com.twitter:finatra-http_2.11:19.12.0") {
// Finatra POM references linux-aarch64 version of this which we don't need. Including it
// prevents us from managing Netty version because the classifier name changed to linux-aarch_64
// in recent releases. So we exclude and force the linux-x86_64 classifier instead.
exclude group: "io.netty", module: "netty-transport-native-epoll"
}
testImplementation "io.netty:netty-transport-native-epoll:4.1.51.Final:linux-x86_64"
// Required for older versions of finatra on JDKs >= 11
testImplementation "com.sun.activation:javax.activation:1.2.0"
latestDepTestImplementation("com.twitter:finatra-http_2.11:+") {
exclude group: "io.netty", module: "netty-transport-native-epoll"
}
}
compileLatestDepTestGroovy {
classpath += files(sourceSets.latestDepTest.scala.classesDirectory)
}
if (testLatestDeps) {
// Separate task
test.enabled = false
}

View File

@ -0,0 +1,66 @@
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
id("org.unbroken-dome.test-sets")
}
testSets {
// We need separate test sources to compile against latest Finatra.
create("latestDepTest")
}
muzzle {
// There are some weird library issues below 2.9 so can't assert inverse
pass {
group.set("com.twitter")
module.set("finatra-http_2.11")
versions.set("[2.9.0,]")
excludeDependency("io.netty:netty-transport-native-epoll")
}
pass {
group.set("com.twitter")
module.set("finatra-http_2.12")
versions.set("[2.9.0,]")
excludeDependency("io.netty:netty-transport-native-epoll")
}
}
dependencies {
// TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
// here.
compileOnly("com.twitter:finatra-http_2.11:2.9.0")
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
if (!(findProperty("testLatestDeps") as Boolean)) {
// Requires old version of Jackson
testImplementation(enforcedPlatform("com.fasterxml.jackson:jackson-bom:2.9.10"))
}
testImplementation("com.twitter:finatra-http_2.11:19.12.0") {
// Finatra POM references linux-aarch64 version of this which we don't need. Including it
// prevents us from managing Netty version because the classifier name changed to linux-aarch_64
// in recent releases. So we exclude and force the linux-x86_64 classifier instead.
exclude("io.netty", "netty-transport-native-epoll")
}
testImplementation("io.netty:netty-transport-native-epoll:4.1.51.Final:linux-x86_64")
// Required for older versions of finatra on JDKs >= 11
testImplementation("com.sun.activation:javax.activation:1.2.0")
add("latestDepTestImplementation", "com.twitter:finatra-http_2.11:+") {
exclude("io.netty", "netty-transport-native-epoll")
}
}
tasks {
named<GroovyCompile>("compileLatestDepTestGroovy") {
classpath = classpath.plus(files(sourceSets["latestDepTest"].scala.classesDirectory))
}
if (findProperty("testLatestDeps") as Boolean) {
// Separate task
named("test") {
enabled = false
}
}
}

View File

@ -1,18 +0,0 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group = "org.apache.geode"
module = "geode-core"
versions = "[1.4.0,)"
}
}
dependencies {
library "org.apache.geode:geode-core:1.4.0"
compileOnly "com.google.auto.value:auto-value-annotations"
annotationProcessor "com.google.auto.value:auto-value"
}

Some files were not shown because too many files have changed in this diff Show More