Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(lib/transactions) ready transactions metrics #1656
feat(lib/transactions) ready transactions metrics #1656
Changes from 6 commits
681cfaf
5f62d09
365b8d7
34b7c33
cc20c9f
f864c3e
4f15bd1
8227b2f
38a7ef7
f390373
232ed98
c7e9fb4
b394fc2
533bc6b
2f695b1
8faa274
63bb7ab
6930c63
e9bb260
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
should there be a context here? otherwise I don't see where this is stopped
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.
added context on all loops that get metrics
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 think it would be nicer if this was called outside of the
NewPool
constructor, and we could have some polling process to iterate over all theGaugeCollector
implementations, rather than having multiple goroutines each polling their own gauge.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.
Got it! I've implemented a
Collector
, that acts like a harvester, which has anAddGauge
and aStart
methods, then theAddGauge
will "register" all theGaugeMetrics
implementations so whenStart
is called (when the node starts) it triggers a goroutine that does polling in all the registereds implementations.I think with this way we can remove all the spread goroutines and centralize in one in the
metrics
package.