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

[processor/cumulativetodelta] Deciding whether to keep the first point based on linear point speculation #35487

Open
h0cheung opened this issue Sep 30, 2024 · 2 comments
Labels
enhancement New feature or request priority:p2 Medium processor/cumulativetodelta Cumulative To Delta processor

Comments

@h0cheung
Copy link
Contributor

Component(s)

processor/cumulativetodelta

Is your feature request related to a problem? Please describe.

When there is no accurate time information for the first point, the first two points can be used to determine whether to keep the first point or not, based on the change in value to infer if the first point is growing from 0.

Describe the solution you'd like

VictoriaMetrics' implementation of the increase function may be good for us: https://github.com/VictoriaMetrics/VictoriaMetrics/blob/3d01bc3fbe3d8f4ff4909408fe45ffc1c1acdcf7/app/vmselect/promql/rollup.go#L1828

It does this by taking the first two points (denoted $v0$ and $v1$), and considering that there is a 0 before the first one if and only if $v0 < 10 * (v1 - v0 + 1)$.a 0. (As we require the input to be monotonic, the Abs could be ignored`)

We can use the same rules to decide whether to output the first point directly as a delta metric point.

Describe alternatives you've considered

No response

Additional context

No response

@h0cheung h0cheung added enhancement New feature or request needs triage New item requiring triage labels Sep 30, 2024
@github-actions github-actions bot added the processor/cumulativetodelta Cumulative To Delta processor label Sep 30, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@TylerHelmuth
Copy link
Member

@h0cheung this feels possible, but I think it would be good as an option, not a required behavior. Can you propose what the user config would look like?

@TylerHelmuth TylerHelmuth added priority:p2 Medium and removed needs triage New item requiring triage labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:p2 Medium processor/cumulativetodelta Cumulative To Delta processor
Projects
None yet
Development

No branches or pull requests

2 participants