Skip to content
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

Allow mutable accumulations #3766

Closed
jamesmoessis opened this issue Oct 18, 2021 · 1 comment
Closed

Allow mutable accumulations #3766

jamesmoessis opened this issue Oct 18, 2021 · 1 comment
Labels
Feature Request Suggest an idea for this project metrics

Comments

@jamesmoessis
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As discussed with @jsuereth in #3724, it would be beneficial to allow accumulations to be mutable. Specifically for the exponential histogram, immutability of accumulations requires a decent amount of CPU + memory.

Describe the solution you'd like
DeltaMetricStorage relies on accumulations being immutable, however switching it to a clone + mutate approach would allow accumulations to be mutated while merging. i.e. merge into existing accumulation rather than creating a new one.

Additionally, we should be careful about the lifecycle and ownership of accumulations. Anything to aid this is encouraged.

@jack-berg
Copy link
Member

Accumulations have been optimized out of the SDK implementation in #5154. This was in addition to several other recent metrics SDK optimizations, some of which were specific to exponential histograms.

Can further optimize allocations by going forward with something like the #5178 prototype, but that's a distinctly different problem than what is requested here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project metrics
Projects
No open projects
Metrics Stability
SDK Stability
Development

No branches or pull requests

3 participants