Hi Anil,
Flink does not maintain the MDC context between threads. Hence, I don't
think that it is possible w/o changes to Flink.
One note, if operators are chained then they are run by the same thread.
Cheers,
Till
On Wed, Dec 2, 2020 at 7:22 AM Anil K wrote:
> Hi All,
>
> Is it possible to have a tracking id in MDC that will be shared across
> chained users defined operations like Filter, KeySelector, Flat map,
> Process function, and Producer?
>
> Tracking id will be read from headers of Kafka Message, which if possible
> plan to set to MDC in log4j. Right now I am seeing tracking id is not
> getting propagated to the next function.
>
> I am using flink 1.9 running in k8.
>
> Thanks, Anil
>