build.gradle.kts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. plugins {
  2. id("otel.java-conventions")
  3. id("otel.publish-conventions")
  4. }
  5. group = "io.opentelemetry.javaagent"
  6. dependencies {
  7. implementation(project(":javaagent-bootstrap"))
  8. implementation(project(":javaagent-extension-api"))
  9. implementation(project(":javaagent-instrumentation-api"))
  10. implementation(project(":instrumentation-api"))
  11. implementation(project(":muzzle"))
  12. implementation("io.opentelemetry:opentelemetry-api")
  13. implementation("io.opentelemetry:opentelemetry-api-metrics")
  14. implementation("io.opentelemetry:opentelemetry-sdk")
  15. implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
  16. implementation("io.opentelemetry:opentelemetry-sdk-metrics")
  17. implementation("io.opentelemetry:opentelemetry-extension-kotlin")
  18. implementation("io.opentelemetry:opentelemetry-extension-aws")
  19. implementation("io.opentelemetry:opentelemetry-extension-trace-propagators")
  20. implementation("io.opentelemetry:opentelemetry-sdk-extension-resources")
  21. implementation("io.opentelemetry:opentelemetry-extension-noop-api")
  22. // Only the logging exporter is included in our slim distribution so we include it here.
  23. // Other exporters are in javaagent-exporters
  24. implementation("io.opentelemetry:opentelemetry-exporter-logging")
  25. api("net.bytebuddy:byte-buddy")
  26. implementation("org.slf4j:slf4j-api")
  27. annotationProcessor("com.google.auto.service:auto-service")
  28. compileOnly("com.google.auto.service:auto-service")
  29. testImplementation(project(":testing-common"))
  30. testImplementation("com.google.guava:guava")
  31. testImplementation("org.assertj:assertj-core")
  32. testImplementation("org.mockito:mockito-core")
  33. testImplementation("org.mockito:mockito-junit-jupiter")
  34. // this only exists to make Intellij happy since it doesn't (currently at least) understand our
  35. // inclusion of this artifact inside of :instrumentation-api
  36. compileOnly(project(":instrumentation-api-caching"))
  37. }
  38. // Here we only include autoconfigure but don"t include OTLP exporters to ensure they are only in
  39. // the full distribution. We need to override the default exporter setting of OTLP as a result.
  40. tasks {
  41. withType<Test>().configureEach {
  42. environment("OTEL_TRACES_EXPORTER", "none")
  43. environment("OTEL_METRICS_EXPORTER", "none")
  44. }
  45. }