[Native] Add prometheus metric exporter using prometheus c++ library#21753
[Native] Add prometheus metric exporter using prometheus c++ library#21753jaystarshot wants to merge 2 commits intoprestodb:masterfrom
Conversation
802dffe to
e15fba0
Compare
|
@jaystarshot : Thanks for this work. Its really good. Curious if you ran some benchmarks (taking https://github.com/jupp0r/prometheus-cpp?tab=readme-ov-file#benchmarks as an example) with your code in Prestissimo ? We might be interested in how this holds up over long periods. Its possible that production servers run for upto a month before recycling the counters as well. The other implementation was super simplistic but was very stream-lined for Ahana/IBM use-case. @karteekmurthys : Would you and Jay be able to co-author an RFC which outlines details of the metrics, how the monitoring is configured, production characteristic. It would help us be more organized for this. |
|
@aditi-pandit Thanks! But I have just started development this week and its not really in production yet. I am also new to cpp and it will take some time. My inital goal was to make it production-ready, deploy, test then update this PR here but I didn't want conflicting implementations in opensource, hence I reached out early. |
e15fba0 to
f4065ea
Compare
f4065ea to
4feeab4
Compare
Summary: 1. Known limitation - Added unit test won't run in CI, this is because the prometheus flag is off in CI since enabling it causes some issues in server tests Test Plan: Unit test + tested via deployment, Metrics populated - https://ugrafana.uberinternal.comx https://querybuilder.uberinternal.com/r/DjLbAMs1F/edit shadow tested Reviewers: #ldap_velox-core, hitarth Reviewed By: #ldap_velox-core, hitarth Subscribers: hitarth, ptiwary, curt JIRA Issues: PRESTO-6312 Differential Revision: https://code.uberinternal.com/D12756007
4feeab4 to
27d3e8e
Compare
| .Help("Summary for " + keyStr) | ||
| .Register(*registry); | ||
| auto& summary = summaryFamily.Add({{"cluster", cluster_}, {"node", node_}, {"host", host_}}, | ||
| prometheus::Summary::Quantiles{{0.5, 0.05}}); |
There was a problem hiding this comment.
0.5 quantile is not the average, instead it is the median value. This is as good as reporting instantaneous value.
|
Closing since the other commit is merged |


Support Prometheus metrics using prometheus cpp library https://github.com/jupp0r/prometheus-cpp which is more stable
This is used in Uber, we are still not in production but we are in shadow mode
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
If release note is NOT required, use: