fluent / fluentd

Fluentd: Unified Logging Layer (project under CNCF)
https://www.fluentd.org
Apache License 2.0
12.93k stars 1.34k forks source link

Always record worker_id in @FLUENT_LOG #3919

Open fujimotos opened 2 years ago

fujimotos commented 2 years ago

Problem

Fluentd is very incosintent about metadata annotation for @FLUENT_LOG. Sometimes it shows the worker's ID as part of log records, and sometimes it won't:

2022-10-17 09:59:13.754376201 +0900 fluent.info: {"pid":75192,"ppid":75186,"worker":0,"message":"starting fluentd worker pid=75192 ppid=75186 worker=0"}
2022-10-17 09:59:13.754640834 +0900 fluent.info: {"worker":0,"message":"fluentd worker is now running worker=0"}
2022-10-17 09:59:16.736660074 +0900 fluent.debug: {"message":"fluentd main process get SIGINT"}
2022-10-17 09:59:17.263191871 +0900 fluent.debug: {"message":"fluentd main process get SIGTERM"}
2022-10-17 09:59:17.263328204 +0900 fluent.debug: {"message":"getting start to shutdown main process"}

This makes the monitoring unnecessarily hard. For example, we sometimes cannot decide which worker emitted a paritcular error.

How to reproduce the issue

Desired Behavior

github-actions[bot] commented 2 years ago

@fujimotos this issue was automatically closed because it did not follow the issue template

daipom commented 1 month ago

We should add #x to the logs handled by @FLUENT_LOG.

#0 listening tcp socket bind="0.0.0.0" port=5170