-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[chore][receiver/snowflakereceiver] #31260
[chore][receiver/snowflakereceiver] #31260
Conversation
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
686ee3d
to
fbdb211
Compare
a229620
to
3bbf863
Compare
f3d9b5a
to
f65a380
Compare
Unfortunately, the |
Actually, nevermind my previous comment. As long as we are not recording datapoints for the same metrics in different threads, we are good |
} | ||
|
||
wg.Wait() | ||
errChan <- nil |
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.
errChan <- nil | |
close(errChan) |
eOut <- errs | ||
return | ||
case err, ok := <-eQueue: | ||
if err == nil || !ok { |
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.
You don't need to send nil to the channel, just close the eQueue
instead.
if err == nil || !ok { | |
if !ok { |
Description: Refactored the scrape function in scrape.go to take better advantage of go's language features. Namely, utilizing go routines and channels to parallelize the individual metric scrapes which make up the overall scrape function. This greatly improves the performance of the receiver.
Link to tracking Issue:
Testing: Unit tests and standalone collectors continue to pass/work
Documentation: No changes to the documentation.