Fix handling of empty metric collection cycles#3335
Fix handling of empty metric collection cycles#3335ocelotl merged 14 commits intoopen-telemetry:mainfrom
Conversation
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py
Outdated
Show resolved
Hide resolved
aabmass
left a comment
There was a problem hiding this comment.
I think we should discuss the issue more in the SIG.
This PR would be a breaking change of the API. If we wanted to go this route, I'd recommend changing here to not call self._receive_metrics if they are empty instead of making it Optional:
5e795f5 to
de1db4d
Compare
Right, fixed. |
|
I am investigating #3277, marking this as a draft meanwhile |
There was a problem hiding this comment.
While this might help for deltas, the SDK should be returning metrics every single collection for readers that are CUMULATIVE (the default). However that seems to not be working corrctly #3277 (comment)
Yes, noticed that now that I added another test case. I think this is a problem for the explicit bucket histogram aggregation who is resetting to zero all bucket counts after every collection even in the aggregation temporality is cumulative. I say we review this PR and address that issue separately.
Fixes #3198