-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #39477 from gsmet/otel-config
Adjust toggle names in OTel InstrumentBuildTimeConfig
- 3.17.5
- 3.17.4
- 3.17.3
- 3.17.2
- 3.17.1
- 3.17.0
- 3.17.0.CR1
- 3.16.4
- 3.16.3
- 3.16.2
- 3.16.1
- 3.16.0
- 3.16.0.CR1
- 3.15.2
- 3.15.1
- 3.15.0
- 3.15.0.CR1
- 3.14.4
- 3.14.3
- 3.14.2
- 3.14.1
- 3.14.0
- 3.14.0.CR1
- 3.13.3
- 3.13.2
- 3.13.1
- 3.13.0
- 3.13.0.CR1
- 3.12.3
- 3.12.2
- 3.12.1
- 3.12.0
- 3.12.0.CR1
- 3.11.3
- 3.11.2
- 3.11.1
- 3.11.0
- 3.11.0.CR1
- 3.10.2
- 3.10.1
- 3.10.0
- 3.10.0.CR1
Showing
5 changed files
with
93 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...emetry/runtime/config/build/InstrumentBuildTimeConfigFallbackConfigSourceInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.quarkus.opentelemetry.runtime.config.build; | ||
|
||
import java.util.function.Function; | ||
|
||
import io.smallrye.config.FallbackConfigSourceInterceptor; | ||
|
||
/** | ||
* @deprecated maps the old config to the new config, should be removed at some point | ||
*/ | ||
@Deprecated(forRemoval = true, since = "3.9") | ||
public class InstrumentBuildTimeConfigFallbackConfigSourceInterceptor extends FallbackConfigSourceInterceptor { | ||
|
||
private static final Function<String, String> RENAME_FUNCTION = new Function<String, String>() { | ||
@Override | ||
public String apply(String s) { | ||
if (!s.startsWith("quarkus.otel.instrument.")) { | ||
return s; | ||
} | ||
|
||
if ("quarkus.otel.instrument.messaging".equals(s)) { | ||
return "quarkus.otel.instrument.reactive-messaging"; | ||
} | ||
if ("quarkus.otel.instrument.resteasy-client".equals(s)) { | ||
return "quarkus.otel.instrument.rest-client-classic"; | ||
} | ||
if ("quarkus.otel.instrument.rest".equals(s)) { | ||
return "quarkus.otel.instrument.resteasy-reactive"; | ||
} | ||
if ("quarkus.otel.instrument.resteasy".equals(s)) { | ||
return "quarkus.otel.instrument.resteasy-classic"; | ||
} | ||
|
||
return s; | ||
} | ||
}; | ||
|
||
public InstrumentBuildTimeConfigFallbackConfigSourceInterceptor() { | ||
super(RENAME_FUNCTION); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...emetry/runtime/config/build/InstrumentBuildTimeConfigRelocateConfigSourceInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.quarkus.opentelemetry.runtime.config.build; | ||
|
||
import java.util.function.Function; | ||
|
||
import io.smallrye.config.RelocateConfigSourceInterceptor; | ||
|
||
/** | ||
* @deprecated maps the old config to the new config, should be removed at some point | ||
*/ | ||
@Deprecated(forRemoval = true, since = "3.9") | ||
public class InstrumentBuildTimeConfigRelocateConfigSourceInterceptor extends RelocateConfigSourceInterceptor { | ||
|
||
private static final Function<String, String> RENAME_FUNCTION = new Function<String, String>() { | ||
@Override | ||
public String apply(String s) { | ||
if (!s.startsWith("quarkus.otel.instrument.")) { | ||
return s; | ||
} | ||
|
||
if ("quarkus.otel.instrument.reactive-messaging".equals(s)) { | ||
return "quarkus.otel.instrument.messaging"; | ||
} | ||
if ("quarkus.otel.instrument.rest-client-classic".equals(s)) { | ||
return "quarkus.otel.instrument.resteasy-client"; | ||
} | ||
if ("quarkus.otel.instrument.resteasy-reactive".equals(s)) { | ||
return "quarkus.otel.instrument.rest"; | ||
} | ||
if ("quarkus.otel.instrument.resteasy-classic".equals(s)) { | ||
return "quarkus.otel.instrument.resteasy"; | ||
} | ||
|
||
return s; | ||
} | ||
}; | ||
|
||
public InstrumentBuildTimeConfigRelocateConfigSourceInterceptor() { | ||
super(RENAME_FUNCTION); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...y/runtime/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceInterceptor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
io.quarkus.opentelemetry.runtime.config.OTelFallbackConfigSourceInterceptor | ||
io.quarkus.opentelemetry.runtime.config.build.InstrumentBuildTimeConfigFallbackConfigSourceInterceptor | ||
io.quarkus.opentelemetry.runtime.config.build.InstrumentBuildTimeConfigRelocateConfigSourceInterceptor |