You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PrecomputedSum in Delta temporality resets baseline on missed/rejected observations, double-counting values #3714
In PrecomputedSum::delta, collection drains and resets the value_map. Any attribute set that is not observed in the current cycle (e.g. an async callback temporarily misses an observation, errors, or an invalid measurement like NaN is dropped) is omitted from new_reported.
When *reported = new_reported executes, all unobserved baselines are cleared.
When the instrument subsequently observes a new measurement, reported.get(...) returns None and defaults to 0. This causes the delta to be computed against 0 rather than the last valid baseline, re-counting previously exported values.
Missed or rejected observations should not immediately discard the baseline. The next valid observation should compute the delta relative to the last reported value.
OpenTelemetry API Version (i.e version of opentelemetry crate)
0.32.0 (and main)
OpenTelemetry SDK Version (i.e version of opentelemetry_sdk crate)
0.32.1 (and main)
What Exporter(s) are you seeing the problem on?
No response
Relevant log output
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Considerations:
Simply retaining all unobserved entries in reported would cause memory to grow indefinitely for short-lived/ephemeral attributes. A proper fix will likely need a stale-attribute eviction mechanism (e.g. TTL or max missed collection cycles) to safely prune dead attribute sets while tolerating transient gaps.
changed the title [-][Bug]: PrecomputedSum in Delta temporality resets baseline on missed/rejected observations, double-counting values[/-][+] PrecomputedSum in Delta temporality resets baseline on missed/rejected observations, double-counting values[/+]on Sep 14, 2026
Activity
darkraider01 commentedon Sep 7, 2026
Considerations:
Simply retaining all unobserved entries in
reportedwould cause memory to grow indefinitely for short-lived/ephemeral attributes. A proper fix will likely need a stale-attribute eviction mechanism (e.g. TTL or max missed collection cycles) to safely prune dead attribute sets while tolerating transient gaps.scottgerring commentedon Sep 14, 2026
Hey @darkraider01 thanks for raising this!
It looks like this is blocked on a spec clarification issue - namely open-telemetry/opentelemetry-specification#4861
I suggest we hold this open to track until that is resolved
/cc @cijothomas
[-][Bug]: PrecomputedSum in Delta temporality resets baseline on missed/rejected observations, double-counting values[/-][+] PrecomputedSum in Delta temporality resets baseline on missed/rejected observations, double-counting values[/+]