Skip to content

Commit 9104f0d

Browse files
committed
Add log messages for empty environment_variable and process_argument values in template variable
1 parent b5deffd commit 9104f0d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal-api/src/main/java/datadog/trace/bootstrap/config/provider/StableConfigParser.java

+3
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ private static String processTemplateVar(String templateVar) throws IOException
244244
}
245245
String value = System.getenv(envVar.toUpperCase());
246246
if (value == null || value.isEmpty()) {
247+
log.debug(
248+
"Environment variable specified in template {} has no value", envVar.toUpperCase());
247249
return UNDEFINED_VALUE;
248250
}
249251
return value;
@@ -261,6 +263,7 @@ private static String processTemplateVar(String templateVar) throws IOException
261263
}
262264
String value = System.getProperty(processArg.substring(2));
263265
if (value == null || value.isEmpty()) {
266+
log.debug("Process argument specified in template {} has no value", processArg);
264267
return UNDEFINED_VALUE;
265268
}
266269
return value;

0 commit comments

Comments
 (0)