-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[processor/deltatocumulative]: bugfix - permit advancing start-time #31365
[processor/deltatocumulative]: bugfix - permit advancing start-time #31365
Conversation
9893da1
to
9163f48
Compare
Imagine this situation:
And T1 < T2 < T3 < T4. The interval from T2 to T3 is unaccounted for and even if a corresponding data point arrives later it would be ignored. Or maybe it gets lost for some reason. What do you think about a metric that tracks this unaccounted time? Since there are no more resets, it would replace the |
@ethercrow I like that, but I think it's out of scope for this PR (given the metrics one isn't even merged). But lets add it later 👍 |
@RichieSams @djaglowski please take a look! |
Ah, they beat me to it. Good find :) |
…pen-telemetry#31365) **Description:** <Describe what has changed.> The [spec](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#sums-delta-to-cumulative) allows the `StartTimestamp` of a delta stream to advance over time, without affecting the aggregation. Previously, the running counter was reset with each start-time change. This was violating the spec and also effectively prevented meaningful aggregation as series were reset all the time. **Testing:** A test-case was modified to explicitly check this behavior is permitted and handled correctly.
Description:
The spec allows the
StartTimestamp
of a delta stream to advance over time, without affecting the aggregation.Previously, the running counter was reset with each start-time change. This was violating the spec and also effectively prevented meaningful aggregation as series were reset all the time.
Testing:
A test-case was modified to explicitly check this behavior is permitted and handled correctly.