-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Align metrics windows to gather interval for cloudwatch input #4667
Conversation
There didn't seem to be an obvious place that I should update the README, so I made no changes. |
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.
Judging by the current code, it's not required to round the start-time/end-time?
|
||
windowEnd := relativeTo.Add(-c.Delay.Duration) | ||
|
||
if c.windowEnd == defaultTime { |
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.
Nitpick: if c.windowEnd.IsZero()
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.
Didn't know that function was there. I'll update
As for the rounding, is there something you had in mind? It looks like, based on this that non-custom metrics have a minimum period of 60s. It also says:
When statistics are aggregated over a period of time, they are stamped with the time corresponding to the beginning of the period.
Seems to indicate it should be aligned to the start of the minute. Is this what you're referring to?
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.
On the rounding, it's probably not something that needs done as I don't see us doing it before. I was just curious if the times needed to rounded and aligned, but I guess either of these ranges would work fine (second one is not aligned to period) and what really matters is that we cover all times?
--start-time 2018-09-06T17:15:00Z --end-time 2018-09-06T17:30:00Z --period 300
--start-time 2018-09-06T17:16:42Z --end-time 2018-09-06T17:31:42Z --period 300
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.
I fixed the zero function.
I think we probably don't need to align the data as long as we cover all time periods, like you said.
Fixes #4643
For consideration, please review
Required for all PRs: