Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluentd formatter process_info method is outdated #190

Open
leshik opened this issue Jan 4, 2022 · 3 comments
Open

Fluentd formatter process_info method is outdated #190

leshik opened this issue Jan 4, 2022 · 3 comments

Comments

@leshik
Copy link

leshik commented Jan 4, 2022

Fluentd formatter process_info method is outdated and not working.

It inherits from Json, which inherits from Raw, which inherits from Base – none of them has the process_info method anymore. It only exists in Default (for backward compatibility I suppose).

@reidmorrison
Copy link
Owner

Since you use Fluentd, can you help explain what it is trying to do in this appender. The comment indicates Ignore fields: pid, thread, file and line by default. I.e. do we want to exclude these fields from the output JSON for Fluentd by default/always?

@leshik
Copy link
Author

leshik commented Jan 18, 2022

Hi, I think yes – Fluentd is mostly used in a containerized environment where processes usually have pid = 1 and hostname is the docker container id, which makes little sense to put in logs. Not sure what was the reasoning behind ignoring the file and line, I'm not using this anyway.

@henare
Copy link

henare commented Jan 16, 2025

I was confused by this too. It definitely doesn't do what it says on the tin and, after looking into fixing it, I suspect it hasn't worked for a while.

As @leshik mentioned, when using Docker, setting the container ID as the hostname isn't very useful and was one of the reasons I was looking at using this formatter. But it never excluded the host in the first place.

With options like log_host already available on the base class my vote would be to deprecate and remove this formattter to avoid confusion. Thanks to the way the formatter code is structured it's easy to write a very simple formatter of your own if you need functionality like this. That's what I plan to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants