Skip to content

Interface to customize MetricStorage #3579

@dontepanlin

Description

@dontepanlin

What are you trying to achieve?

Developing prometheus metric exporter with help of opentelemetry-cpp. Problem of my case is that i have only one counter metric with labels. Specific metric timeseries differ by this labels. By the way, amount of unique label tuples is always grow, which may lead to big memory consumption. Another problem, it is that some labels might become outdated after some period of time. This main problem, how to get rid of this old labels from internal storage.

Only working approach is to delete metric and recreate it, but it looks like bad design

What did you expect to see?

Some interface for expire unused labels or just deletion from this storage.

Additional context.
Ofc it could be ideal to have some ttl expiration policy internally. I have it in my project but i can't use it ith opentelemetry without patching codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions