build.gradle.kts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("org.unbroken-dome.test-sets")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("org.apache.kafka")
  8. module.set("kafka-streams")
  9. versions.set("[0.11.0.0,)")
  10. }
  11. }
  12. dependencies {
  13. bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
  14. implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))
  15. library("org.apache.kafka:kafka-streams:0.11.0.0")
  16. // Include kafka-clients instrumentation for tests.
  17. testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))
  18. testImplementation("org.testcontainers:kafka")
  19. }
  20. tasks {
  21. withType<Test>().configureEach {
  22. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  23. // TODO run tests both with and without experimental span attributes
  24. jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
  25. }
  26. val testReceiveSpansDisabled by registering(Test::class) {
  27. filter {
  28. includeTestsMatching("KafkaStreamsSuppressReceiveSpansTest")
  29. isFailOnNoMatchingTests = false
  30. }
  31. include("**/KafkaStreamsSuppressReceiveSpansTest.*")
  32. jvmArgs("-Dotel.instrumentation.common.experimental.suppress-messaging-receive-spans=true")
  33. }
  34. test {
  35. dependsOn(testReceiveSpansDisabled)
  36. filter {
  37. excludeTestsMatching("KafkaStreamsSuppressReceiveSpansTest")
  38. isFailOnNoMatchingTests = false
  39. }
  40. }
  41. }