-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
Because some other errors might happen than the one handled (stoplist). Example, if the tag values have an invalid format, the response is something like: `{"measurements":{"summary":{"total":174,"accepted":78,"failed":96,"filtered":0}},"errors":[{"param":"tag_value","value":"41454@127_0_0_1","reason":"Invalid format"}]}` So it would be nice to log the whole response in debug mode to avoid discarding important failures.
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.
I'm ok with this but we may want to do this for 2xx responses only. 4xx and 5xx will be handled in the lines below but, with the current implementation, the logs might get super chatty. I think you'll get a log statement for the response and an additional log statement for a 4xx/5xx response
cc @jderrett
@bryanmikaelian : yes it's chatty, and I think this is what you want when in debug mode: this is the only way I have as a user of this plugin to make sure Librato receives the response and processes it and then to see its answer. |
Cool. Makes sense. I'll see if anyone else on the team has any thoughts and then we can merge / release. |
If we are logging the request, seems like logging all responses is equally verbose. 👍 |
👍 Thanks for the contribution @mathieucarbou! I'll get this merged and published to npm today. |
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.
Thanks!
Because some other errors might happen than the one handled (stoplist). Example, if the tag values have an invalid format, the response is something like:
So it would be nice to log the whole response in debug mode to avoid discarding important failures.