-
Notifications
You must be signed in to change notification settings - Fork 431
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
Use generics to dispatch updates in ValueMap
#2004
Use generics to dispatch updates in ValueMap
#2004
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2004 +/- ##
=======================================
- Coverage 75.1% 74.8% -0.3%
=======================================
Files 122 122
Lines 20642 20678 +36
=======================================
- Hits 15503 15473 -30
- Misses 5139 5205 +66 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Utkarsh Umesan Pillai <[email protected]>
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.
LGTM, Thanks for the extra cleanups.
Fixes #1517 (incorrect cumulative aggregation for observable counters).
This is a follow-up to #1992 as I cannot push to the original branch.
It re-introduces the ideas from #1644 : the
ValueMap
with anO
(operation) parameter so that observations can be performed with the correct semantics (Increment
for synchronous counters,Assign
for observable ones).I've accounted for the pending review comments on the initial PR and refactored the
measure
method a bit to limit right-ward drift.Edit to include the additional gains with this change:
Additionally, the previous implementation of the Observable relied on the assumption that the ValueMap is drained after ever collect. This is an area that could be tweaked in the future. This PR removed that dependency anyway, so this is better future proof.