You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/01 09:52:28 UTC

[GitHub] [beam] manuel-hegner opened a new issue, #22123: [Feature Request]: Support slf4j MDC within DataflowWorkerLoggingHandler

manuel-hegner opened a new issue, #22123:
URL: https://github.com/apache/beam/issues/22123

   ### What would you like to happen?
   
   Since the Dataflow documentation suggests to use Slf4j for logging it would only make sense that Dataflow would also log the `org.slf4j.MDC` key value pairs into the JSON logging object.
   
   This could look something like this:
   ```java
   Map<String, String> mdc = MDC.getCopyOfContextMap();
   if(!mdc.isEmpty() {
     generator.writeFieldName("mdc");
     generator.writeStartObject();
     for(Entry<String, String> entry : mdc.entrySet()) {
       generator.writeStringField(entry.getKey(), entry.getValue());
     }
     generator.writeEndObject();
   }
   ```
   
   If this is an accepted feature I would be willing to work on this.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: runner-dataflow


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] manuel-hegner commented on issue #22123: [Feature Request]: Support slf4j MDC within DataflowWorkerLoggingHandler

Posted by GitBox <gi...@apache.org>.
manuel-hegner commented on issue #22123:
URL: https://github.com/apache/beam/issues/22123#issuecomment-1238147331

   Still interesting


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kennknowles commented on issue #22123: [Feature Request]: Support slf4j MDC within DataflowWorkerLoggingHandler

Posted by GitBox <gi...@apache.org>.
kennknowles commented on issue #22123:
URL: https://github.com/apache/beam/issues/22123#issuecomment-1335955364

   Hmm I actually thought we already supported something like this. Definitely interesting. Most useful to do this within the Beam Java SDK harness, since that is the new runner v2 way o fdoing it


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] closed issue #22123: [Feature Request]: Support slf4j MDC within DataflowWorkerLoggingHandler

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #22123: [Feature Request]: Support slf4j MDC within DataflowWorkerLoggingHandler
URL: https://github.com/apache/beam/issues/22123


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org