Skip to content

Performance regression in OTel-Go metrics API v0.38.x #446

@jmacd

Description

@jmacd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions