build.gradle.kts 824 B

12345678910111213141516171819202122
  1. plugins {
  2. id("otel.library-instrumentation")
  3. }
  4. dependencies {
  5. implementation(project(":instrumentation-appender-api-internal"))
  6. implementation(project(":instrumentation-appender-sdk-internal"))
  7. library("org.apache.logging.log4j:log4j-core:2.16.0")
  8. testImplementation(project(":instrumentation-appender-sdk-internal"))
  9. testImplementation("io.opentelemetry:opentelemetry-sdk-logs")
  10. testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
  11. testImplementation("org.mockito:mockito-core")
  12. }
  13. tasks.withType<Test>().configureEach {
  14. // TODO run tests both with and without experimental log attributes
  15. jvmArgs("-Dotel.instrumentation.log4j-appender.experimental.capture-map-message-attributes=true")
  16. jvmArgs("-Dotel.instrumentation.log4j-appender.experimental.capture-context-data-attributes=*")
  17. }