Skip to content
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

Add subtract_initial_point strategy skeleton #38380

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Mar 5, 2025

Description

Add a skeleton for the subtract_initial_point strategy. The implementation will follow in subsequent PRs.

Link to tracking issue

Part of #37186, and #38379

Testing

Added config_test.go

Documentation

Updated the README.

@dashpole dashpole force-pushed the subtract_initial_point branch from 52e8c4d to a1e410d Compare March 5, 2025 03:23
Pros:

* Cumulative semantics are preserved. This means that for a point with a given `[start, end]` interval, the cumulative value occurred in that interval.
* Rates over resulting timeseries are correct, even if points are lost. This strategy is not stateful.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this last bit true? we still need to store the previous value of the timeseries to detect resets, and also the initial point timestamp for every subsequent point.

Copy link
Contributor Author

@dashpole dashpole Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that the sequence of resulting points isn't stateful. Each point is meaningful on its own, as it gives you a correct average rate over the interval.

I'm trying to contrast it with the true_reset_point strategy. If you lose the initial "true reset" point, you will interpret subsequent points incorrectly.

Feel free to suggest wording or framing that makes more sense to you.

@atoulme atoulme merged commit 1aed17d into open-telemetry:main Mar 7, 2025
156 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 7, 2025
@dashpole dashpole deleted the subtract_initial_point branch March 7, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants