We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0951500 + 5b110b1 commit a12f16dCopy full SHA for a12f16d
1 file changed
utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider/OtelEnvironmentConfigSource.java
@@ -318,9 +318,12 @@ private String getDatadogProperty(String sysProp) {
318
* <p>Checks system properties and environment variables.
319
*/
320
private static String getProperty(String sysProp) {
321
- String value = SystemProperties.get(sysProp);
322
- if (null == value) {
323
- value = ConfigHelper.env(toEnvVar(sysProp));
+ // Always validate through ConfigHelper so STRICT_TEST mode can detect unsupported configs
+ String value = ConfigHelper.env(toEnvVar(sysProp));
+ // System property takes precedence over environment variable
324
+ String sysPropValue = SystemProperties.get(sysProp);
325
+ if (sysPropValue != null) {
326
+ value = sysPropValue;
327
}
328
return value;
329
0 commit comments