-
Notifications
You must be signed in to change notification settings - Fork 72
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
Switch to promhttp handler and continue on error #57
Switch to promhttp handler and continue on error #57
Conversation
When cAdvisor did similar in google/cadvisor#1679 it ended up making the scrape succeed, but instead started returning arbitrary subsets of the metrics. |
Indeed, the metric not matching the stable label length criterion isn't sent anymore. Wouldn't it be better that I make this behavior configurable via a command-line argument? |
I don't think it's a good idea to add a |
Ok I understand. When you say fix the label. You mean in collectd_exporter or upstream in collectd? |
Wherever it needs to be fixed, I'm not too familiar with this part of collectd. |
Ok, so I'll close this PR keeping the original issue regarding the incompatibility open. |
Yes, that's the idea behind the option. The client library is designed to never create invalid output, thus it can only fail completely or leave out the offending parts. |
Indeed @beorn7, I implemented this change exactly for that purpose as I can't use the I'll use my own version for tests waiting to find a proper fix that suits everyone to make the exporter compatible with collectd's way to export such metrics trough its binary protocol. |
Have you considered using collectd's own Prometheus metrics output? It lacks this sanity checking. |
I must admit that I wasn't aware of its existence. Thanks! I'll take a look at it. |
Hi all,
This PR follows a discussion started in #56 and use the new HTTP handler provided by the
promhttp
package along with thepromhttp.ContinueOnError
error handler to prevent inconsistent metrics from preventing the whole scraping.Please let me know if this requests suits you or if I missed something here.
Regards.