-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(aggregate transform): Event-time based aggregation support #23694
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi @adiwab, the PR title |
|
Hi @adiwab any update here? |
|
Hi @kaarolch, thanks again for your feedback and for raising this issue! Just to clarify: my contribution was initially more of a draft. I’ve tested it to some extent, but not across all use cases, and it definitely needs someone to review it — especially since I’m not a Rust expert. Proper tests are also still missing and would need to be added before considering it a complete or production-ready solution. Is there anyone who might be able to help refine and complete this? I'd really appreciate support from someone more experienced with Rust or the specific aggregation logic. regards |
|
Hi @adiwab! I've created a separate PR with a few edge case fixes. I hope you don't mind 🙂 |
|
Hi @kaarolch! Thanks, no worries at all 🙂 |
#14015
Summary
Event-time handling (absolute metrics in
AutoandLatest/Diff):Processing-time path:
AutoandLatest/Diffare still replaced by the last arriving sample (no event-timestamp check yet).Other aggregation modes preserved:
Sum,Countfor incremental metrics unchanged.Max,Min,Mean,Stdevcontinue to aggregate multiple samples per bucket.Diffemits the difference between the current and previous bucket values.New configuration options:
clock: choose bucket alignment by Processing (Vector wall clock) or Event (event timestamps).allowed_lateness_ms: wait time for late or out-of-order samples in event-time mode (default: 120s).emit_ts: set output timestamp to BucketStart or BucketEnd.Important Notes
Vector configuration
prom_aggregate:
type: aggregate
inputs:
- prometheus
interval_ms: 60000
mode: Latest
clock: Event
allowed_lateness_ms: 60000
How did you test this PR?
I built the changes locally (win11 - Build 26100) and verified the results by sending metrics into InfluxDB and inspecting them in Grafana dashboards.
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.cargo fmt --allcargo clippy --workspace --all-targets -- -D warningscargo nextest run --workspace(alternatively, you can runcargo test --all)git merge origin masterandgit push.Cargo.lock), pleaserun
cargo vdev build licensesto regenerate the license inventory and commit the changes (if any). More details here.