build.gradle.kts 2.4 KB

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