Skip to content

InMemoryExporter for Metric is buggy #2361

@cijothomas

Description

@cijothomas

Unlike Traces, the Batch provided to the exporter is re-used by SDK to keep metrics in memory. This means that, after the Export(Batch), returns, the memory must not be read by the exporters. If they do so, they might be reading incorrect values.

InMemoryExporter is buggy in this way - the fix would be for the InMemoryExporter to "deep copy" the Metric, MetricPoints, before Export() call returns, so that it has own copy, unaffected by further aggregations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmetricsMetrics signal related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions