Skip to content

No way to reset meter state #5729

Open
Open
@lionskape

Description

@lionskape

NB: Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.

Is your feature request related to a problem? Please describe.

I'm writing a tests for my code and using InMemoryMetricExporter exporter to validate measured metrics and values.
So, I have no way to reset an internal state of metrics shared state. Calling reset on exporter only reset a state of exporter, but not the collected values from internal state (shared state)

Describe the solution you'd like

Something like a method of MeterProvider to reset an internal state

Additional context

It's absolutely mandatory to validate if metrics are recorded correctly for any big project. So, in-memory experts is a great option for that, but there is definitely a lack of some mandatory features for that. So, also please note, that "just replace a MeterProvider is not an option". Testing code can store a provider instide itself, during the runs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions