69 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| plugins {
 | |
|   id("otel.javaagent-instrumentation")
 | |
| }
 | |
| 
 | |
| muzzle {
 | |
|   pass {
 | |
|     group.set("org.apache.kafka")
 | |
|     module.set("kafka-clients")
 | |
|     versions.set("[0.11.0.0,)")
 | |
|     assertInverse.set(true)
 | |
|     excludeInstrumentationName("kafka-clients-metrics")
 | |
|   }
 | |
| }
 | |
| 
 | |
| dependencies {
 | |
|   compileOnly("com.google.auto.value:auto-value-annotations")
 | |
|   annotationProcessor("com.google.auto.value:auto-value")
 | |
| 
 | |
|   bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
 | |
|   implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common-0.11:library"))
 | |
| 
 | |
|   library("org.apache.kafka:kafka-clients:0.11.0.0")
 | |
| 
 | |
|   testImplementation("org.testcontainers:kafka")
 | |
|   testImplementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:testing"))
 | |
| }
 | |
| 
 | |
| tasks {
 | |
|   withType<Test>().configureEach {
 | |
|     usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
 | |
| 
 | |
|     systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
 | |
| 
 | |
|     // TODO run tests both with and without experimental span attributes
 | |
|     jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
 | |
|   }
 | |
| 
 | |
|   val testPropagationDisabled by registering(Test::class) {
 | |
|     testClassesDirs = sourceSets.test.get().output.classesDirs
 | |
|     classpath = sourceSets.test.get().runtimeClasspath
 | |
|     filter {
 | |
|       includeTestsMatching("KafkaClientPropagationDisabledTest")
 | |
|     }
 | |
|     include("**/KafkaClientPropagationDisabledTest.*")
 | |
|     jvmArgs("-Dotel.instrumentation.kafka.producer-propagation.enabled=false")
 | |
|   }
 | |
| 
 | |
|   val testReceiveSpansDisabled by registering(Test::class) {
 | |
|     testClassesDirs = sourceSets.test.get().output.classesDirs
 | |
|     classpath = sourceSets.test.get().runtimeClasspath
 | |
|     filter {
 | |
|       includeTestsMatching("KafkaClientSuppressReceiveSpansTest")
 | |
|     }
 | |
|     include("**/KafkaClientSuppressReceiveSpansTest.*")
 | |
|   }
 | |
| 
 | |
|   test {
 | |
|     filter {
 | |
|       excludeTestsMatching("KafkaClientPropagationDisabledTest")
 | |
|       excludeTestsMatching("KafkaClientSuppressReceiveSpansTest")
 | |
|     }
 | |
|     jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
 | |
|   }
 | |
| 
 | |
|   check {
 | |
|     dependsOn(testPropagationDisabled, testReceiveSpansDisabled)
 | |
|   }
 | |
| }
 |