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

Feature Request - batch logging in FluentLogger->post() function #22

Open
aacanakin opened this issue Feb 5, 2014 · 4 comments
Open

Comments

@aacanakin
Copy link

Hello,
I want to be able to write batch logs (50 items) atomically.
Currently, I'm posting logs in foreach loop in batch requests. However, if td agent stops unexpectedly, I need to write the complete request(50 items) to csv. Is it possible in the current code base ? Does fluentd interface support batch logging ?

Thanks
Aras

@chobie
Copy link
Member

chobie commented Feb 5, 2014

AFAIK, fluentd doesn't have such interface. in_tail might solve your concerns.
I recommend to use in_tail and FileLogger if you can switch fluentd configuration.

http://docs.fluentd.org/articles/in_tail

Basically, PHP is poor about back ground task like sending metrics data. It's PHP architecture design. But it can improve with C extension. I'll plan to add async logger this year.

@disq
Copy link

disq commented Mar 17, 2014

Yes, this does improve performance. curl is always faster than file_get_contents.

@cosmo0920
Copy link

FYI: For now, you can use Embulk for batch operations.
Embulk is designed for batch operations.

@repeatedly
Copy link
Member

This issue seems to request micro-batch forward, not Embulk like huge batching.

in_forward accepts multiple events in one request so supporting this is good for some users.
http://docs.fluentd.org/articles/in_forward#protocol

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

No branches or pull requests

5 participants