Izeren commented on code in PR #28917:
URL: https://github.com/apache/flink/pull/28917#discussion_r3736123556
##########
flink-core/src/main/java/org/apache/flink/util/MdcUtils.java:
##########
@@ -162,9 +178,18 @@ public static Map<String, String> asContextData(
jobConfiguration.get(MdcOptions.JOB_CONFIGURATION_TO_MDC_KEYS);
final Map<String, String> context = new HashMap<>();
for (Map.Entry<String, String> entry : mdcKeyMapping.entrySet()) {
+ final String mdcKeyName = entry.getValue();
+ if (mdcKeyName == null || mdcKeyName.isBlank()) {
+ if (WARNED_BLANK_MDC_KEYS.add(entry.getKey())) {
+ LOG.warn(
+ "MDC key name for configuration key '{}' is blank;
skipping.",
+ entry.getKey());
+ }
+ continue;
Review Comment:
I agree, I was 50/50 between this and silently skipping the values. Fallback
to the key sounds good to me, will update the PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]