-
Notifications
You must be signed in to change notification settings - Fork 440
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
[SDK] Add exemplar reservoir to async metric storage #2319
[SDK] Add exemplar reservoir to async metric storage #2319
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2319 +/- ##
==========================================
+ Coverage 87.45% 87.47% +0.02%
==========================================
Files 199 199
Lines 5996 5997 +1
==========================================
+ Hits 5243 5245 +2
+ Misses 753 752 -1
|
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.
Ok to merge, to keep the async code on par with sync.
The exemplar reservoir feature is not complete yet, and will likely need changes to reach a stable status
#ifdef ENABLE_METRICS_EXEMPLAR_PREVIEW | ||
exemplar_reservoir_->OfferMeasurement(measurement.second, {}, {}, | ||
std::chrono::system_clock::now()); | ||
#endif |
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.
This makes the async code at par with the sync metric storage, so approved.
In the long term, I think we will need to refactor the exemplar reservoir interface, to reduce overhead.
This calls:
- creates dummy objects, for each measurements
- calls now(), for each measurement
- invoke a virtual function
- only to land on a noop implementation in common cases
Very wasteful compared to representing a noop reservoir with a nullptr, and testing a pointer.
Ok as long as we have a feature flag.
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 PR.
Fixes #2318
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes