[
https://issues.apache.org/jira/browse/FLINK-40208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-40208:
-----------------------------------
Labels: pull-request-available (was: )
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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)