Fix metadata config flag casing (#14414)
This commit is contained in:
parent
157638eacf
commit
0426a80687
|
|
@ -24,7 +24,7 @@ tasks {
|
|||
```
|
||||
|
||||
Sometimes instrumentation will behave differently based on configuration options, and we can
|
||||
differentiate between these configurations by using the `metaDataConfig` system property. When the
|
||||
differentiate between these configurations by using the `metadataConfig` system property. When the
|
||||
telemetry is written to a file, the value of this property will be included, or it will default to
|
||||
a `default` attribution.
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ if (latestDepTest) {
|
|||
tasks.withType<Test>().configureEach {
|
||||
jvmArgs("-Dotel.instrumentation.apache-shenyu.experimental-span-attributes=true")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.apache-shenyu.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.apache-shenyu.experimental-span-attributes=true")
|
||||
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
|
||||
|
||||
// required on jdk17
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ tasks {
|
|||
systemProperty("otel.instrumentation.messaging.experimental.receive-telemetry.enabled", "true")
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ tasks {
|
|||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -59,12 +59,12 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
val testExperimental by registering(Test::class) {
|
||||
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -78,12 +78,12 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database,code")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
val testExperimental by registering(Test::class) {
|
||||
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ tasks {
|
|||
classpath = suite.sources.runtimeClasspath
|
||||
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ tasks {
|
|||
classpath = suite.sources.runtimeClasspath
|
||||
|
||||
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,6 @@ tasks {
|
|||
jvmArgs("-Dotel.instrumentation.http.server.emit-experimental-telemetry=true")
|
||||
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.http.client.emit-experimental-telemetry=true,otel.instrumentation.http.server.emit-experimental-telemetry=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.http.client.emit-experimental-telemetry=true,otel.instrumentation.http.server.emit-experimental-telemetry=true")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ tasks {
|
|||
val testExperimental by registering(Test::class) {
|
||||
jvmArgs("-Dotel.instrumentation.oshi.experimental-metrics.enabled=true")
|
||||
systemProperty("testExperimental", "true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.oshi.experimental-metrics.enabled=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.oshi.experimental-metrics.enabled=true")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ tasks {
|
|||
}
|
||||
|
||||
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-batch.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-batch.experimental-span-attributes=true")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ tasks {
|
|||
|
||||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ tasks {
|
|||
include("**/SpringIntegrationAndRabbitTest.*")
|
||||
jvmArgs("-Dotel.instrumentation.rabbitmq.enabled=true")
|
||||
jvmArgs("-Dotel.instrumentation.spring-rabbit.enabled=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-rabbit.enabled=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-rabbit.enabled=true")
|
||||
}
|
||||
|
||||
val testWithProducerInstrumentation by registering(Test::class) {
|
||||
|
|
@ -59,7 +59,7 @@ tasks {
|
|||
jvmArgs("-Dotel.instrumentation.rabbitmq.enabled=false")
|
||||
jvmArgs("-Dotel.instrumentation.spring-rabbit.enabled=false")
|
||||
jvmArgs("-Dotel.instrumentation.spring-integration.producer.enabled=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-integration.producer.enabled=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-integration.producer.enabled=true")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ tasks {
|
|||
jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
|
||||
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.kafka.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.kafka.experimental-span-attributes=true")
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ tasks {
|
|||
|
||||
val testExperimental by registering(Test::class) {
|
||||
jvmArgs("-Dotel.instrumentation.spring-scheduling.experimental-span-attributes=true")
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-scheduling.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-scheduling.experimental-span-attributes=true")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ otelJava {
|
|||
}
|
||||
|
||||
tasks.test {
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.common.enduser.id.enabled=true,otel.instrumentation.common.enduser.role.enabled=true,otel.instrumentation.common.enduser.scope.enabled=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.common.enduser.id.enabled=true,otel.instrumentation.common.enduser.role.enabled=true,otel.instrumentation.common.enduser.scope.enabled=true")
|
||||
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ tasks.withType<Test>().configureEach {
|
|||
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
|
||||
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled")
|
||||
systemProperty("testLatestDeps", latestDepTest)
|
||||
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ tasks {
|
|||
}
|
||||
|
||||
val testExperimental by registering(Test::class) {
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
jvmArgs("-Dotel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ tasks {
|
|||
}
|
||||
|
||||
val testExperimental by registering(Test::class) {
|
||||
systemProperty("metaDataConfig", "otel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
systemProperty("metadataConfig", "otel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
jvmArgs("-Dotel.instrumentation.spring-webmvc.experimental-span-attributes=true")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ tasks {
|
|||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ tasks {
|
|||
val testStableSemconv by registering(Test::class) {
|
||||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ tasks {
|
|||
jvmArgs("-Dotel.semconv-stability.opt-in=database")
|
||||
|
||||
systemProperty("collectMetadata", collectMetadata)
|
||||
systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database")
|
||||
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public final class MetaDataCollector {
|
|||
Paths.get(instrumentationPath, TMP_DIR, "spans-" + UUID.randomUUID() + ".yaml");
|
||||
|
||||
try (BufferedWriter writer = Files.newBufferedWriter(spansPath.toFile().toPath(), UTF_8)) {
|
||||
String config = System.getProperty("metaDataConfig");
|
||||
String config = System.getProperty("metadataConfig");
|
||||
String when = "default";
|
||||
if (config != null && !config.isEmpty()) {
|
||||
when = config;
|
||||
|
|
@ -138,7 +138,7 @@ public final class MetaDataCollector {
|
|||
Paths.get(instrumentationPath, TMP_DIR, "metrics-" + UUID.randomUUID() + ".yaml");
|
||||
|
||||
try (BufferedWriter writer = Files.newBufferedWriter(metricsPath.toFile().toPath(), UTF_8)) {
|
||||
String config = System.getProperty("metaDataConfig");
|
||||
String config = System.getProperty("metadataConfig");
|
||||
String when = "default";
|
||||
if (config != null && !config.isEmpty()) {
|
||||
when = config;
|
||||
|
|
|
|||
Loading…
Reference in New Issue