feat(new transform): #24655 Add a transformer to translate absolute to incremental metrics.#24839
Open
johannesfloriangeiger wants to merge 9 commits intovectordotdev:masterfrom
Conversation
…ransformer to translate absolute to incremental metrics.
buraizu
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
See title, add a transformer that can translate absolute to incremental metrics, the counterpart to the existing "Incremental to Absolute" Transformer.
This addresses the second observed issue in #24655 where the AWS CloudWatch Metric Sink will not properly rotate buffer files when processing absolute counter metrics. My working theory is that because the sink will translate absolute counters to incremental counters the event that gets sent to CloudWatch eventually differs from the event that the sink receives - and thus, the buffer is never rotated because the original metric is never acknowledged. Ideally, the AWS CloudWatch Metric Sink would not buffer incoming metrics until after they are pre-processed (i.e., filter out all unsupported metrics and translate all absolute counters into incremental ones) but I assume that's a bigger piece of Vector architecture change? So, this transformer acts as a workaround as it allows users to pre-process absolute metrics before they reach the sink and thus letting the buffer rotate again properly as the event that gets sent is the same as the sink receives.
Vector configuration
How did you test this PR?
Manually, see above configuration and observe that the buffer files rotate correctly.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.