-
Notifications
You must be signed in to change notification settings - Fork 1.9k
enhancement(aggregate): Add Distribution as an aggregation mode #23994
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
Open
jlambatl
wants to merge
9
commits into
vectordotdev:master
Choose a base branch
from
jlambatl:transform_aggregate_distribution
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
enhancement(aggregate): Add Distribution as an aggregation mode #23994
jlambatl
wants to merge
9
commits into
vectordotdev:master
from
jlambatl:transform_aggregate_distribution
+467
−7
Conversation
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
…/jlambatl/vector into transform_aggregate_distribution
pront
reviewed
Oct 13, 2025
src/transforms/aggregate.rs
Outdated
kind: MetricKind::Absolute, | ||
value: MetricValue::Distribution { | ||
samples, | ||
statistic: StatisticKind::Histogram, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense if this was producing a Summary
? Since we are aggregating raw metrics.
…improve the documentation that is generated for the distribution aggregation mode in the configuration parameter
I've pushed up a commit that should resolve the comments/feedback provided. It's hard to find the balance between being too verbose and not providing enough clarity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
domain: external docs
Anything related to Vector's external, public documentation
domain: transforms
Anything related to Vector's transform components
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
This change adds a new AggregateMode
distribution
that aggregates individual metrics into a distribution. This doesn't reduce the accuracy of the metrics; instead, it reduces the volume of payloads being emitted from Vector by reducing the overhead of duplicate tags and other fields in exchange for a single larger payload.This pattern suits real-time analytics databases, where histograms and other statistical functions can be calculated on the fly. It reduces the need to manually codify histogram buckets, which can become an onerous task on systems dealing with large metric volumes.
The distribution is sorted in the current implementation. I have been unsure whether that is a good idea, but I'm happy to change that based on your feedback.
Vector configuration
How did you test this PR?
I have added many different unit tests that cover the primary aggregation types, histograms, distributions, etc.
Change Type
Is this a breaking change?
Does this PR include user-facing changes?
no-changelog
label to this PR.Notes
N/A