Describe the bug
The new functional-option call pattern for synchronous metric instruments adds 4 allocations to every former ...attribute.KeyValue call site unless the code can be rewritten.
To Reproduce
New benchmarks will be added (PR T.B.D.)
Expected behavior
When a metrics operation repeats an attribute set that has recently been used, there will be zero allocations even when using a []attribute.KeyValue.
Additional context
See open-telemetry/opentelemetry-go#4052
Describe the bug
The new functional-option call pattern for synchronous metric instruments adds 4 allocations to every former
...attribute.KeyValuecall site unless the code can be rewritten.To Reproduce
New benchmarks will be added (PR T.B.D.)
Expected behavior
When a metrics operation repeats an attribute set that has recently been used, there will be zero allocations even when using a
[]attribute.KeyValue.Additional context
See open-telemetry/opentelemetry-go#4052