You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Roman Khachatryan (Jira)" <ji...@apache.org> on 2026/07/30 18:50:00 UTC
[jira] [Reopened] (FLINK-40208) Support adding jobConfiguration keys of choice to logging MDC
[ https://issues.apache.org/jira/browse/FLINK-40208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Khachatryan reopened FLINK-40208:
---------------------------------------
> Support adding jobConfiguration keys of choice to logging MDC
> -------------------------------------------------------------
>
> Key: FLINK-40208
> URL: https://issues.apache.org/jira/browse/FLINK-40208
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Checkpointing, Runtime / Coordination, Runtime / Task
> Reporter: Aleksandr Iushmanov
> Assignee: Aleksandr Iushmanov
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> https://issues.apache.org/jira/browse/FLINK-34417 has provided a path forward to track particular job in logs. In multi-tenant environments there are more meaningful aggregate identifiers (e.g. tenantId) that are immensely useful in to have in logs.
> I propose a new configuration key that would enhance MDC not only with a JobId but allow for extending MDC context with values of choice taken from JobConfigurations.
> Example of how that would be configured, no impact on existing jobs by default.
> {quote}{{public static final ConfigOption<Map<String, String>> JOB_CONFIGURATION_TO_MDC_KEYS =}}
> {{key("mdc.job-configuration-to-mdc-keys")}}
> {{.mapType()}}
> {{.defaultValue(Collections.emptyMap())}}
> {{.withDescription(}}
> {{"Maps job configuration keys to MDC key names. "}}
> {{+ "At job start, each listed configuration key is looked up; "}}
> {{+ "if the value is present and non-blank it is emitted into MDC under the mapped name. "}}
> {{+ "Keys absent or blank in the job configuration are skipped.");}}
> {quote}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)