-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: Add error message logging to outputs.http #9727
fix: Add error message logging to outputs.http #9727
Conversation
We run a multitenant system with 1000s of users and some of them use Telegraf to push to us. The error logs they see look like this: ``` 2021-09-06T06:07:34Z E! [agent] Error writing to outputs.http: when writing to [XXX] received status code: 400 2021-09-06T06:07:34Z D! [outputs.http] Buffer fullness: 2410 / 200000 metrics 2021-09-06T06:07:34Z E! [agent] Error writing to outputs.http: when writing to [XXX] received status code: 400 2021-09-06T06:07:44Z D! [outputs.http] Buffer fullness: 2415 / 200000 metrics 2021-09-06T06:07:44Z E! [agent] Error writing to outputs.http: when writing to [XXXX] received status code: 400 ``` Our upstream returns actionable messages that make the issue pretty clear to our users, but those using Telegraf cannot see those messages. I propose that users should be able to see the error message returned from upstream. We're seeing more and more of our users adopting Telegraf and its an awesome project! This is not the first time our users contacted regarding this issue and I think this enhancement will be useful to wider community as well! This particular piece of code has been inspired by how Prometheus remote write does the error logging. Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding more logging info sounds like a good idea to me! Thanks for this pr.
Thanks for the review @sspaink! Is there anything else I need to do to get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the PR!
(cherry picked from commit 357959f)
We run a multitenant system with 1000s of users and some of them use
Telegraf to push to us. The error logs they see look like this:
Our upstream returns actionable messages that make the issue pretty
clear to our users, but those using Telegraf cannot see those messages.
I propose that users should be able to see the error message returned
from upstream.
We're seeing more and more of our users adopting Telegraf and its an
awesome project! This is not the first time our users contacted
regarding this issue and I think this enhancement will be useful to
wider community as well!
This particular piece of code has been inspired by how Prometheus remote
write does the error logging.
Signed-off-by: Goutham Veeramachaneni gouthamve@gmail.com
Required for all PRs:
resolves #