Skip to content

Commit 59098a3

Browse files
committed
more gradle
1 parent a9d3395 commit 59098a3

File tree

17 files changed

+170
-35
lines changed

17 files changed

+170
-35
lines changed

instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,12 @@ tasks {
164164
include("software/amazon/awssdk/global/handlers/execution.interceptors")
165165
}
166166
}
167+
168+
val testStableSemconv by registering(Test::class) {
169+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
170+
}
171+
172+
check {
173+
dependsOn(testStableSemconv)
174+
}
167175
}

instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigure/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,12 @@ tasks {
3131
systemProperty("otel.instrumentation.messaging.experimental.capture-headers", "test-message-header")
3232
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
3333
}
34+
35+
val testStableSemconv by registering(Test::class) {
36+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
37+
}
38+
39+
check {
40+
dependsOn(testStableSemconv)
41+
}
3442
}

instrumentation/aws-sdk/aws-sdk-2.2/library/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,12 @@ tasks {
7272
systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", true)
7373
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
7474
}
75+
76+
val testStableSemconv by registering(Test::class) {
77+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
78+
}
79+
80+
check {
81+
dependsOn(testStableSemconv)
82+
}
7583
}

instrumentation/camel-2.20/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ tasks {
7979

8080
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
8181
}
82+
83+
val testStableSemconv by registering(Test::class) {
84+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
85+
}
86+
87+
check {
88+
dependsOn(testStableSemconv)
89+
}
8290
}
8391

8492
configurations.testRuntimeClasspath {

instrumentation/clickhouse-client-0.5/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,12 @@ tasks {
2525
test {
2626
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
2727
}
28+
29+
val testStableSemconv by registering(Test::class) {
30+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
31+
}
32+
33+
check {
34+
dependsOn(testStableSemconv)
35+
}
2836
}

instrumentation/hibernate/hibernate-3.3/javaagent/build.gradle.kts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,20 @@ if (findProperty("testLatestDeps") as Boolean) {
4848
}
4949
}
5050

51-
tasks.withType<Test>().configureEach {
52-
// TODO run tests both with and without experimental span attributes
53-
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
54-
// required on jdk17
55-
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
56-
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
51+
tasks {
52+
withType<Test>().configureEach {
53+
// TODO run tests both with and without experimental span attributes
54+
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
55+
// required on jdk17
56+
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
57+
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
58+
}
59+
60+
val testStableSemconv by registering(Test::class) {
61+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
62+
}
63+
64+
check {
65+
dependsOn(testStableSemconv)
66+
}
5767
}

instrumentation/hibernate/hibernate-4.0/javaagent/build.gradle.kts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,25 @@ testing {
7171
}
7272
}
7373

74-
tasks.withType<Test>().configureEach {
75-
// required on jdk17
76-
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
77-
jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
78-
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
74+
tasks {
75+
withType<Test>().configureEach {
76+
// required on jdk17
77+
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
78+
jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
79+
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
7980

80-
// TODO run tests both with and without experimental span attributes
81-
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
81+
// TODO run tests both with and without experimental span attributes
82+
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
8283

83-
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
84-
}
84+
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
85+
}
86+
87+
val testStableSemconv by registering(Test::class) {
88+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
89+
}
8590

86-
tasks {
8791
check {
8892
dependsOn(testing.suites)
93+
dependsOn(testStableSemconv)
8994
}
9095
}

instrumentation/hibernate/hibernate-6.0/javaagent/build.gradle.kts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ otelJava {
3535
minJavaVersionSupported.set(JavaVersion.VERSION_11)
3636
}
3737

38-
tasks.withType<Test>().configureEach {
39-
// TODO run tests both with and without experimental span attributes
40-
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
38+
tasks {
39+
withType<Test>().configureEach {
40+
// TODO run tests both with and without experimental span attributes
41+
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
42+
}
43+
44+
val testStableSemconv by registering(Test::class) {
45+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
46+
}
47+
48+
check {
49+
dependsOn(testStableSemconv)
50+
}
4151
}

instrumentation/hibernate/hibernate-6.0/spring-testing/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,21 @@ otelJava {
2626
minJavaVersionSupported.set(JavaVersion.VERSION_17)
2727
}
2828

29-
tasks.withType<Test>().configureEach {
30-
jvmArgs("-javaagent:" + springAgent.singleFile.absolutePath)
29+
tasks {
30+
withType<Test>().configureEach {
31+
jvmArgs("-javaagent:" + springAgent.singleFile.absolutePath)
3132

32-
// TODO run tests both with and without experimental span attributes
33-
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
33+
// TODO run tests both with and without experimental span attributes
34+
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
3435

35-
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
36+
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
37+
}
38+
39+
val testStableSemconv by registering(Test::class) {
40+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
41+
}
42+
43+
check {
44+
dependsOn(testStableSemconv)
45+
}
3646
}

instrumentation/hibernate/hibernate-procedure-call-4.3/javaagent/build.gradle.kts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,17 @@ dependencies {
3131
latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+") // documented limitation
3232
}
3333

34-
tasks.withType<Test>().configureEach {
35-
// TODO run tests both with and without experimental span attributes
36-
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
34+
tasks {
35+
withType<Test>().configureEach {
36+
// TODO run tests both with and without experimental span attributes
37+
jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
38+
}
39+
40+
val testStableSemconv by registering(Test::class) {
41+
jvmArgs("-Dotel.semconv-stability.opt-in=database")
42+
}
43+
44+
check {
45+
dependsOn(testStableSemconv)
46+
}
3747
}

0 commit comments

Comments
 (0)