opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Allow mutable accumulations

Open jamesmoessis opened this issue 4 years ago • 0 comments

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.

jamesmoessis avatar Oct 18 '21 23:10 jamesmoessis