influxdata / influxdata/kapacitor

[FR] Window properties: .allign(shift time.Duration)

Open
#1,154 1 comment 0 reactions 0 assignees View on GitHub
needs more info
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Will be good to have ability to set .allign() shift as parameter.
In a case of points with timestamp 'each 5min (alligned)', points are in DB a few (cca 5-10) secs later. It is standard situation. And companies want data alligned in that way. :(
I make batch task with standard compute speed from bytecounters (nonnegative-derivative) between last two points. For 5m sampling .period(7m) window length is used.
|window()
.period(7m)
.every(5m)
.allign()

For reason of .every edge inclusion/exclusion and delay writing to DB, points emited and aligned to same time as .every() .allign() edge are processed in next .every() run - after 5min! Too late for alerting and realtime graph.
I need ability to shift .every() edge alligning.
Will be good to have .every(5m) .allign(1m) to have edge in 01,06,11,16,.. for example.

Sorry for my bad english. I hope it's clear.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the implementation of window(), .every(), and .allign() in the Kapacitor codebase, focusing on how window edges are calculated and how points at boundaries are assigned. Done means .every(5m).allign(1m) produces edges at 01, 06, 11, 16, and delayed points are processed in the intended run.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
stream-processing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.