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

node-collector.go's Collect function all-or-nothing #186

Open
jshufro opened this issue Jan 20, 2022 · 0 comments
Open

node-collector.go's Collect function all-or-nothing #186

jshufro opened this issue Jan 20, 2022 · 0 comments

Comments

@jshufro
Copy link
Contributor

jshufro commented Jan 20, 2022

Collect spins up a bunch of goroutines in a waitgroup to gather stats, then waits for them, exiting early if any one fails.

Subsequently it publishes them all synchronously. This means if any one metric can't be computed due to some transient error, none are.

This decision seems to be a result of the fact some metrics are derived from other stats, and those stats need to be observed before the derived metrics can be published.

One option would be to compute all the derived metrics in grafana, and only publish raw metrics to prometheus. Alternatively, the raw metrics could asynchronously produce their results on the output channel (which is thread-safe), and the derived metrics could synchronously produce their results on the channel iff all the raw metrics succeed.

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

1 participant