Skip to content

Several bugs with metrics aggregation #3418

@ocelotl

Description

@ocelotl

We have several bugs in our implementation of metrics aggregations.

Race condition on MetricReader.collect when using asynchronous instruments

Fixed in #3335 here.

We wrongly calculate the value for a point using delta temporality

Fixed in #3390

We produce MetricsData without any data points if an aggregation returns None

Fixed in #3335 here.

We produce metrics when using a synchronous instrument and delta temporality when no measurements were taken since last collection cycle

This was discussed during the previous SIG. It was suggested to produce 0-valued points instead of producing no points at all. We should not do that but do not return any points at all, the spec says so:

For synchronous instruments with Delta aggregation temporality, MetricReader.Collect MUST only receive data points with measurements recorded since the previous collection.

We don't keep producing metrics using ExplicitBucketHistogramAggregation and cumulative temporality even if no new data is produced after a collection cycle

As mentioned here

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions