-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add fetchMetrics API to BaseStatsReporter #10178
Conversation
✅ Deploy Preview for meta-velox ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
22ecbe6
to
8a11e54
Compare
@tanjialiang can you help review/land this change? Thanks! |
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.
@majetideepak why we need this? thanks!
@xiaoxmeng We need this to simplify the prometheus metrics implementation in Presto.
|
@xiaoxmeng, @tanjialiang any thoughts on this API? Thanks! |
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 for the change. Some minor issues.
velox/common/base/StatsReporter.h
Outdated
@@ -135,6 +135,9 @@ class BaseStatsReporter { | |||
virtual void addHistogramMetricValue(folly::StringPiece key, size_t value) | |||
const = 0; | |||
|
|||
/// Return the metrics in a serialized string format. |
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.
/// Return the aggregated metrics in a serialized string format.
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 wondering if this API should be const. Depending on implementations, clean-like operations can happen inside per each fetch interval.
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.
Makes sense to remove the const. I address the comments. Thanks!
@tanjialiang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@tanjialiang merged this pull request in 0fe2e62. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Return the aggregated metrics in a serialized string format.