flink
flink copied to clipboard
[FLINK-34417] Log Job ID via MDC
What is the purpose of the change
Add Flink JobID to logging MDC to make analysing the logs easier.
Verifying this change
- added
JobIdLoggingMainThreadExecutor
- tested manually
- micro-benchmarked on http://flink-speed.xyz/: benchmark-request-log-job-id-scheduler.csv, benchmark-request-log-job-id.csv - no regressions found
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving)
: (yes / no) - The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): potentially - change logging by task thread by adding MDC key/value pair
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
- The S3 file system connector: (yes / no / don't know)
Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
CI report:
- 06f76efa100d8008a68d28711c46221e5e4fa606 UNKNOWN
- 7bbfa258300f3592e6b27642bfa47d1ef9633fe4 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:-
@flinkbot run azure
re-run the last Azure build
@flinkbot run azure
@flinkbot run azure
@flinkbot run azure
The failure is unrelated: FLINK-34420
@flinkbot run azure
Re-ran benchmarks - no regressions found: jmh-result-runtime.csv jmh-result-scheduler.csv