build.gradle.kts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  24. // TODO run tests both with and without experimental span attributes
  25. jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
  26. }
  27. val testReceiveSpansDisabled by registering(Test::class) {
  28. filter {
  29. includeTestsMatching("KafkaStreamsSuppressReceiveSpansTest")
  30. }
  31. include("**/KafkaStreamsSuppressReceiveSpansTest.*")
  32. }
  33. test {
  34. filter {
  35. excludeTestsMatching("KafkaStreamsSuppressReceiveSpansTest")
  36. }
  37. jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
  38. }
  39. check {
  40. dependsOn(testReceiveSpansDisabled)
  41. }
  42. }