Izeren opened a new pull request, #28799:
URL: https://github.com/apache/flink/pull/28799

   ## What is the purpose of the change
   
   Add `JobMdcRegistry`, a process-wide registry that maps `JobID` to an 
enriched MDC context derived from job configuration. This enables operators to 
surface custom job config values (e.g. org ID, environment) in Flink's JVM logs 
via MDC.
   
   ## Brief change log
   
   - Add `MdcOptions` with `mdc.job-configuration-to-mdc-keys` 
(`Map<String,String>`) config option
   - Add `JobMdcRegistry` — thread-safe static registry populated in 
`Dispatcher` and `TaskExecutor`
   - Update `MdcUtils.asContextData(JobID)` to consult the registry before 
falling back to the plain job-id singleton
   - Add `JobIDLoggingITCase.testEnrichedMdcLogging` to verify enriched keys 
appear in log output
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - Added `JobMdcRegistryTest` covering register, overwrite, unregister, and 
isolation between jobs
   - Extended `MdcUtilsTest` with parameterized tests for config extraction and 
registry-first lookup
   - Added `JobIDLoggingITCase.testEnrichedMdcLogging` as an end-to-end 
integration test
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes (`MdcOptions` is `@PublicEvolving`)
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? yes
   - If yes, how is the feature documented? JavaDocs + config docs 
auto-generated from `ConfigOption`
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Claude Code)
   
   Generated-by: Claude Code
   


-- 
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]

Reply via email to