build.gradle.kts 2.3 KB

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