Skip to content

[Metrics SDK] Async aggregation doesn't do re-aggregation properly when the spatial dimensions are dropped #1724

@lalitb

Description

@lalitb

As discussed here - open-telemetry/opentelemetry-specification#2905, Most of the languages doesn't handle re-aggregation when the the spatial dimensions are dropped, and C++ is no different. OpenTelemetry C++ uses the last of these processed measurements as the aggregated metrics to be reported.

So, if a view is defined for async counter to remove the attributes with "version" key. And we get the measurements.

async_counter->observer(1, {"version",1}) --> (1, {})
async_counter->observer(2, {"version",2}) --> (2, {})

Existing behavior -> Report the last measurement (2,{}) as the aggregated metrics
Expected behavior -> Report the sum of both the measurements (3, {}) as the aggregated metrics.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions