flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hamilton, Paul" <paul.hamilto...@sap.com>
Subject Adding Context To Logs
Date Thu, 02 Jun 2016 16:53:00 GMT
Hi,

We are trying to rework the way our Flink jobs (and really it becomes how the operators within
the jobs) log.  Specifically we are trying to add contextual information to the log messages
so that it is easier to filter and search for a specific jobs logs after they have been send
through to our ELK stack.  I am certainly open to suggestions, and hopefully  I am missing
something easier, but these were my current thoughts:


1)       In the application and then also within individual functions that log add the “job
name” to the logging MDC in the open function so that no matter where  it is running on
it can log the appropriate job name.  The problem here is that I haven’t found an easy way
to get to the job name within the RichFunction.  What would be the best way to get it?


2)       Pass the job name (and any other contextual things we want to log) in at construction
time when building the flink job to each function that needs them.  Simple, but seems kind
of ugly.


Thoughts?

Thanks,

Paul Hamilton
SAP Hybris
Mime
View raw message