Skip to content

Commit a12f16d

Browse files
[skip ci] commit 5b110b1
2 parents 0951500 + 5b110b1 commit a12f16d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider/OtelEnvironmentConfigSource.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,12 @@ private String getDatadogProperty(String sysProp) {
318318
* <p>Checks system properties and environment variables.
319319
*/
320320
private static String getProperty(String sysProp) {
321-
String value = SystemProperties.get(sysProp);
322-
if (null == value) {
323-
value = ConfigHelper.env(toEnvVar(sysProp));
321+
// Always validate through ConfigHelper so STRICT_TEST mode can detect unsupported configs
322+
String value = ConfigHelper.env(toEnvVar(sysProp));
323+
// System property takes precedence over environment variable
324+
String sysPropValue = SystemProperties.get(sysProp);
325+
if (sysPropValue != null) {
326+
value = sysPropValue;
324327
}
325328
return value;
326329
}

0 commit comments

Comments
 (0)