-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
42 lines (35 loc) · 1.14 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
plugins {
id("otel.library-instrumentation")
}
base.archivesName.set("${base.archivesName.get()}-autoconfigure")
dependencies {
compileOnly(project(":javaagent-extension-api"))
library("org.apache.logging.log4j:log4j-core:2.17.0")
testImplementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-common:testing"))
}
tasks {
test {
filter {
excludeTestsMatching("LibraryLog4j2BaggageTest")
excludeTestsMatching("LibraryLog4j2LoggingKeysTest")
}
}
val testAddBaggage by registering(Test::class) {
filter {
includeTestsMatching("LibraryLog4j2BaggageTest")
}
jvmArgs("-Dotel.instrumentation.log4j-context-data.add-baggage=true")
}
val testLoggingKeys by registering(Test::class) {
filter {
includeTestsMatching("LibraryLog4j2LoggingKeysTest")
}
jvmArgs("-Dotel.instrumentation.common.logging.trace-id=trace_id_test")
jvmArgs("-Dotel.instrumentation.common.logging.span-id=span_id_test")
jvmArgs("-Dotel.instrumentation.common.logging.trace-flags=trace_flags_test")
}
named("check") {
dependsOn(testAddBaggage)
dependsOn(testLoggingKeys)
}
}