-
Notifications
You must be signed in to change notification settings - Fork 83
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 sender doesn't send logs in case of end() call. #91
Comments
|
@nikhilkakade2108 Please read winston section in README.md. |
I added requireAckResponse: true in config, but it is not working for me. The problem here is, I cannot use support.winstonTransport() due to some limitations (I need to add lambdaname by default in every log statement). Is there any other way to end the fluentdSender with all logs flushed at back-end and without using setTimeout()? The question I have is, what is difference between using support.winstonTransport() and createFluentSender(), because former works properly without any setTimeout()? calling emit() manually for fluentdSender and ending the connection doesn't send a single log in backend. |
Hmm, your code in first comment is not same as sample code in README.md. Which do you want to use fluent-logger's winston support or raw FluentSender? Could you show me minimal reproducible code? |
yes I am using raw FluentSender. Please refer this code.
I cannot see any logs at Fluentd end with above code. |
We can wait ack response from server using following snippet: fluentSender.end("label", {"message": "Good bye!"}); |
writting |
I am creating fluentd sender by using createFluentSender() function.
Below is my code.
It is not logging anything in backend. If I remove fluentdSender.end() it works properly.
Removing fluentdSender.end() hangs the process and in case of lambda, function timeout occurs.
Using setTimeout() cannot be the solution in my case, since we have multiple lambdas, which eventually increase cost for us.
I cannot use winston support transport because I need to manipulate message before emit.
The text was updated successfully, but these errors were encountered: