Skip to content

Commit

Permalink
Reduce top level instrumentation directories (#4965)
Browse files Browse the repository at this point in the history
* akka

* dropwizard

* kafka

* reactor

* vertx
  • Loading branch information
trask authored Dec 22, 2021
1 parent 9e3bd5c commit 6884d66
Show file tree
Hide file tree
Showing 233 changed files with 60 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ dependencies {

// 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"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-fork-join-2.5:javaagent"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ dependencies {
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")

bootstrap(project(":instrumentation:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka-clients:kafka-clients-common:library"))
bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))

library("org.apache.kafka:kafka-clients:0.11.0.0")

testImplementation("org.testcontainers:kafka")
testImplementation(project(":instrumentation:kafka-clients:kafka-clients-0.11:testing"))
testImplementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:testing"))
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class KafkaClientDefaultTest extends KafkaClientPropagationBaseTest {
when: "receive messages"
awaitUntilConsumerIsReady()
def consumerRecords = consumer.poll(Duration.ofSeconds(5).toMillis())
def recordsInPartition = consumerRecords.records(topicPartition)
def recordsInPartition = consumerRecords.records(KafkaClientBaseTest.topicPartition)
recordsInPartition.size() == 1
// iterate over records to generate spans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {

implementation("org.apache.kafka:kafka-clients:0.11.0.0")

implementation(project(":instrumentation:kafka-clients:kafka-clients-common:library"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))

implementation("org.testcontainers:kafka")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ plugins {
}

dependencies {
implementation(project(":instrumentation:kafka-clients:kafka-clients-common:library"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))
library("org.apache.kafka:kafka-clients:2.6.0")

testImplementation(project(":instrumentation:kafka-clients:kafka-clients-0.11:testing"))
testImplementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:testing"))
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.10.2")

testImplementation("org.testcontainers:kafka")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ muzzle {
}

dependencies {
bootstrap(project(":instrumentation:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka-clients:kafka-clients-common:library"))
bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))

library("org.apache.kafka:kafka-streams:0.11.0.0")

// Include kafka-clients instrumentation for tests.
testInstrumentation(project(":instrumentation:kafka-clients:kafka-clients-0.11:javaagent"))
testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))

testImplementation("org.testcontainers:kafka")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class KafkaStreamsDefaultTest extends KafkaStreamsBaseTest {
def "test kafka produce and consume with streams in-between"() {
setup:
def config = new Properties()
config.putAll(producerProps(kafka.bootstrapServers))
config.putAll(producerProps(KafkaStreamsBaseTest.kafka.bootstrapServers))
config.put(StreamsConfig.APPLICATION_ID_CONFIG, "test-application")
config.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.Integer().getClass().getName())
config.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName())
Expand Down Expand Up @@ -65,11 +65,11 @@ class KafkaStreamsDefaultTest extends KafkaStreamsBaseTest {

when:
String greeting = "TESTING TESTING 123!"
producer.send(new ProducerRecord<>(STREAM_PENDING, greeting))
KafkaStreamsBaseTest.producer.send(new ProducerRecord<>(STREAM_PENDING, greeting))

then:
awaitUntilConsumerIsReady()
def records = consumer.poll(Duration.ofSeconds(10).toMillis())
def records = KafkaStreamsBaseTest.consumer.poll(Duration.ofSeconds(10).toMillis())
Headers receivedHeaders = null
for (record in records) {
Span.current().setAttribute("testing", 123)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class KafkaStreamsSuppressReceiveSpansTest extends KafkaStreamsBaseTest {
def "test kafka produce and consume with streams in-between"() {
setup:
def config = new Properties()
config.putAll(producerProps(kafka.bootstrapServers))
config.putAll(producerProps(KafkaStreamsBaseTest.kafka.bootstrapServers))
config.put(StreamsConfig.APPLICATION_ID_CONFIG, "test-application")
config.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.Integer().getClass().getName())
config.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName())
Expand Down Expand Up @@ -65,11 +65,11 @@ class KafkaStreamsSuppressReceiveSpansTest extends KafkaStreamsBaseTest {

when:
String greeting = "TESTING TESTING 123!"
producer.send(new ProducerRecord<>(STREAM_PENDING, greeting))
KafkaStreamsBaseTest.producer.send(new ProducerRecord<>(STREAM_PENDING, greeting))

then:
// check that the message was received
def records = consumer.poll(Duration.ofSeconds(10).toMillis())
def records = KafkaStreamsBaseTest.consumer.poll(Duration.ofSeconds(10).toMillis())
Headers receivedHeaders = null
for (record in records) {
Span.current().setAttribute("testing", 123)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation(project(":instrumentation:lettuce:lettuce-common:library"))

testImplementation("io.lettuce:lettuce-core:5.0.0.RELEASE")
testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {

// Only 5.2+ will have command arguments in the db.statement tag.
testLibrary("io.lettuce:lettuce-core:5.2.0.RELEASE")
testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
implementation(project(":instrumentation:lettuce:lettuce-common:library"))

testImplementation(project(":instrumentation:lettuce:lettuce-5.1:testing"))
testImplementation(project(":instrumentation:reactor-3.1:library"))
testImplementation(project(":instrumentation:reactor:reactor-3.1:library"))
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ dependencies {
// These are to ensure cross compatibility
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.5:javaagent"))

latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:1.+")
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ dependencies {
// These are to ensure cross compatibility
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.5:javaagent"))

latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:2.0.+")
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ dependencies {
// These are to ensure cross compatibility
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.5:javaagent"))
}
2 changes: 1 addition & 1 deletion instrumentation/play/play-2.4/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {

testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:async-http-client:async-http-client-2.0:javaagent"))

// Before 2.5, play used netty 3.x which isn't supported, so for better test consistency, we test with just 2.5
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/play/play-2.6/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ dependencies {

testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-actor-2.5:javaagent"))
testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))

testLibrary("com.typesafe.play:play-java_$scalaVersion:$playVersion")
// TODO: Play WS is a separately versioned library starting with 2.6 and needs separate instrumentation.
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
exclude("com.rabbitmq", "amqp-client")
}

testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))

testLibrary("io.projectreactor.rabbitmq:reactor-rabbitmq:1.0.0.RELEASE")
// since reactor-rabbitmq:1.5.4 there is only a runtime dependency to reactor-core but spock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks.withType<Test>().configureEach {
}

dependencies {
implementation(project(":instrumentation:reactor-3.1:library"))
implementation(project(":instrumentation:reactor:reactor-3.1:library"))
library("io.projectreactor:reactor-core:3.1.0.RELEASE")

implementation(project(":instrumentation:opentelemetry-api:opentelemetry-api-1.0:javaagent"))
Expand All @@ -28,7 +28,7 @@ dependencies {
compileOnly(project(path = ":opentelemetry-api-shaded-for-instrumenting", configuration = "shadow"))

testLibrary("io.projectreactor:reactor-test:3.1.0.RELEASE")
testImplementation(project(":instrumentation:reactor-3.1:testing"))
testImplementation(project(":instrumentation:reactor:reactor-3.1:testing"))
testImplementation("io.opentelemetry:opentelemetry-extension-annotations")

// Looks like later versions on reactor need this dependency for some reason even though it is marked as optional.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
implementation(project(":instrumentation-api-annotation-support"))
testLibrary("io.projectreactor:reactor-test:3.1.0.RELEASE")

testImplementation(project(":instrumentation:reactor-3.1:testing"))
testImplementation(project(":instrumentation:reactor:reactor-3.1:testing"))

// Looks like later versions on reactor need this dependency for some reason even though it is marked as optional.
latestDepTestLibrary("io.micrometer:micrometer-core:1.+")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ dependencies {
implementation(project(":instrumentation:netty:netty-4.1-common:javaagent"))
library("io.projectreactor.netty:reactor-netty:0.9.0.RELEASE")

testInstrumentation(project(":instrumentation:reactor-netty:reactor-netty-1.0:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-netty:reactor-netty-1.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))

latestDepTestLibrary("io.projectreactor.netty:reactor-netty:(,1.0.0)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ dependencies {
annotationProcessor("com.google.auto.value:auto-value")

implementation(project(":instrumentation:netty:netty-4.1-common:javaagent"))
implementation(project(":instrumentation:reactor-3.1:library"))
implementation(project(":instrumentation:reactor:reactor-3.1:library"))

library("io.projectreactor.netty:reactor-netty-http:1.0.0")

testInstrumentation(project(":instrumentation:reactor-netty:reactor-netty-0.9:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-netty:reactor-netty-0.9:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))

testLibrary("io.projectreactor:reactor-test:3.1.0.RELEASE")
testImplementation("io.opentelemetry:opentelemetry-extension-annotations")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ dependencies {
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")

bootstrap(project(":instrumentation:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka-clients:kafka-clients-common:library"))
bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))

library("org.springframework.kafka:spring-kafka:2.7.0")

testInstrumentation(project(":instrumentation:kafka-clients:kafka-clients-0.11:javaagent"))
testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))

testImplementation("org.testcontainers:kafka")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ dependencies {
compileOnly("io.projectreactor.ipc:reactor-netty:0.7.0.RELEASE")

testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor-netty:reactor-netty-1.0:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-netty:reactor-netty-1.0:javaagent"))

// Compile with both old and new netty packages since our test references both for old and
// latest dep tests.
Expand Down
32 changes: 16 additions & 16 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ include(":testing-common:library-for-integration-tests")
// smoke tests
include(":smoke-tests")

include(":instrumentation:akka-actor-2.5:javaagent")
include(":instrumentation:akka-actor-fork-join-2.5:javaagent")
include(":instrumentation:akka-http-10.0:javaagent")
include(":instrumentation:akka:akka-actor-2.5:javaagent")
include(":instrumentation:akka:akka-actor-fork-join-2.5:javaagent")
include(":instrumentation:akka:akka-http-10.0:javaagent")
include(":instrumentation:apache-camel-2.20:javaagent")
include(":instrumentation:apache-camel-2.20:javaagent-unit-tests")
include(":instrumentation:apache-dubbo-2.7:javaagent")
Expand Down Expand Up @@ -167,8 +167,8 @@ include(":instrumentation:couchbase:couchbase-3.1.6:tracing-opentelemetry-shaded
include(":instrumentation:couchbase:couchbase-3.2:javaagent")
include(":instrumentation:couchbase:couchbase-3.2:tracing-opentelemetry-shaded")
include(":instrumentation:couchbase:couchbase-common:testing")
include(":instrumentation:dropwizard-views-0.7:javaagent")
include(":instrumentation:dropwizard-testing")
include(":instrumentation:dropwizard:dropwizard-views-0.7:javaagent")
include(":instrumentation:dropwizard:dropwizard-testing")
include(":instrumentation:elasticsearch:elasticsearch-rest-common:javaagent")
include(":instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent")
include(":instrumentation:elasticsearch:elasticsearch-rest-6.4:javaagent")
Expand Down Expand Up @@ -249,12 +249,12 @@ include(":instrumentation:jsf:jsf-common:testing")
include(":instrumentation:jsf:jsf-mojarra-1.2:javaagent")
include(":instrumentation:jsf:jsf-myfaces-1.2:javaagent")
include(":instrumentation:jsp-2.3:javaagent")
include(":instrumentation:kafka-clients:kafka-clients-0.11:bootstrap")
include(":instrumentation:kafka-clients:kafka-clients-0.11:javaagent")
include(":instrumentation:kafka-clients:kafka-clients-0.11:testing")
include(":instrumentation:kafka-clients:kafka-clients-2.6:library")
include(":instrumentation:kafka-clients:kafka-clients-common:library")
include(":instrumentation:kafka-streams-0.11:javaagent")
include(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap")
include(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent")
include(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:testing")
include(":instrumentation:kafka:kafka-clients:kafka-clients-2.6:library")
include(":instrumentation:kafka:kafka-clients:kafka-clients-common:library")
include(":instrumentation:kafka:kafka-streams-0.11:javaagent")
include(":instrumentation:kotlinx-coroutines:javaagent")
include(":instrumentation:kubernetes-client-7.0:javaagent")
include(":instrumentation:kubernetes-client-7.0:javaagent-unit-tests")
Expand Down Expand Up @@ -318,11 +318,11 @@ include(":instrumentation:rabbitmq-2.7:javaagent")
include(":instrumentation:ratpack:ratpack-1.4:javaagent")
include(":instrumentation:ratpack:ratpack-1.4:testing")
include(":instrumentation:ratpack:ratpack-1.7:library")
include(":instrumentation:reactor-3.1:javaagent")
include(":instrumentation:reactor-3.1:library")
include(":instrumentation:reactor-3.1:testing")
include(":instrumentation:reactor-netty:reactor-netty-0.9:javaagent")
include(":instrumentation:reactor-netty:reactor-netty-1.0:javaagent")
include(":instrumentation:reactor:reactor-3.1:javaagent")
include(":instrumentation:reactor:reactor-3.1:library")
include(":instrumentation:reactor:reactor-3.1:testing")
include(":instrumentation:reactor:reactor-netty:reactor-netty-0.9:javaagent")
include(":instrumentation:reactor:reactor-netty:reactor-netty-1.0:javaagent")
include(":instrumentation:rediscala-1.8:javaagent")
include(":instrumentation:redisson-3.0:javaagent")
include(":instrumentation:restlet:restlet-1.0:javaagent")
Expand Down

0 comments on commit 6884d66

Please sign in to comment.