Conversation
This change adds MetricsFarm::report_full() to force histograms to publish complete bucket distributions on-demand, regardless of their registration mode (publish_as_sum_count, publish_as_gauge, or publish_as_histogram). Implementation: - Add publish_full() method to MetricsGroupImpl for internal publishing - Add report_full() to MetricsFarm that creates temporary reporter - Add accessor methods (labels()) to StaticInfo classes for encapsulation Use case: Allows operators to scrape complete histogram distributions for detailed analysis, while normal scraping uses sum/count mode to reduce Prometheus cardinality. Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
724e4ce to
77d9d60
Compare
Histogram sum and count should use Gauge instead of Counter because: - Gauges can increase or decrease, representing current state - Counters are monotonically increasing and should never decrease - Histogram sum/count represent current aggregated values, not accumulations - Semantically correct for Prometheus metrics This change updates PrometheusReportSumCount to use prometheus::Gauge instead of prometheus::Counter, and changes set_value() to use Set() instead of Increment(). Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
77d9d60 to
4c37771
Compare
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #298 +/- ##
===========================================
- Coverage 64.29% 50.38% -13.92%
===========================================
Files 72 63 -9
Lines 4406 4178 -228
Branches 555 1825 +1270
===========================================
- Hits 2833 2105 -728
+ Misses 1327 879 -448
- Partials 246 1194 +948
🚀 New features to boost your workflow:
|
|
LGTM. Could you help add more comment for |
PR Review (Claude Generated): Add report_full() APIBased on my review of the changes in the OverviewThis PR adds a Strengths ✅
Issues & Suggestions 🔍Minor Issues:
Questions:
Code Quality
Overall AssessmentLGTM with minor suggestions. This is a solid implementation that adds useful functionality without breaking existing behavior. The main Recommendation: Approve with consideration of adding API documentation comments. |
|
@szmyd can you consume your AI agent review into your human review |
No description provided.