build.gradle.kts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.apache.kafka")
  7. module.set("kafka-streams")
  8. versions.set("[0.11.0.0,)")
  9. }
  10. }
  11. dependencies {
  12. bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
  13. implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))
  14. library("org.apache.kafka:kafka-streams:0.11.0.0")
  15. // Include kafka-clients instrumentation for tests.
  16. testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))
  17. testImplementation("org.testcontainers:kafka")
  18. }
  19. tasks {
  20. withType<Test>().configureEach {
  21. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  22. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  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. }
  30. include("**/KafkaStreamsSuppressReceiveSpansTest.*")
  31. }
  32. test {
  33. filter {
  34. excludeTestsMatching("KafkaStreamsSuppressReceiveSpansTest")
  35. }
  36. jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
  37. }
  38. check {
  39. dependsOn(testReceiveSpansDisabled)
  40. }
  41. }