Add direct access API for metrics#293
Merged
xiaoxichen merged 2 commits intoeBay:masterfrom Feb 3, 2026
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #293 +/- ##
===========================================
- Coverage 64.29% 50.56% -13.74%
===========================================
Files 72 63 -9
Lines 4406 4080 -326
Branches 555 1771 +1216
===========================================
- Hits 2833 2063 -770
+ Misses 1327 864 -463
- Partials 246 1153 +907
🚀 New features to boost your workflow:
|
95939d0 to
e165e7a
Compare
This adds COUNTER_VALUE, GAUGE_VALUE, and HISTOGRAM_VALUE macros that allow reading metric values directly as native types (int64_t for counters/gauges, HistogramStatistics struct for histograms) without going through JSON serialization. Also made gather_result() public to allow custom metric collection without JSON if needed. Tests added to farm_test.cpp verify the new direct access methods work correctly across all metric types. Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
e165e7a to
879aaad
Compare
szmyd
reviewed
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds COUNTER_VALUE, GAUGE_VALUE, and HISTOGRAM_VALUE macros that allow reading metric values directly as native types (int64_t for counters/gauges, HistogramStatistics struct for histograms) without going through JSON serialization.
Also made gather_result() public to allow custom metric collection without JSON if needed.
Tests added to wrapper_test.cpp verify the new direct access methods work correctly across all metric types.