Align metrics windows to gather interval for cloudwatch input#4667
Align metrics windows to gather interval for cloudwatch input#4667danielnelson merged 1 commit intoinfluxdata:masterfrom
Conversation
|
There didn't seem to be an obvious place that I should update the README, so I made no changes. |
danielnelson
left a comment
There was a problem hiding this comment.
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.
Nitpick: if c.windowEnd.IsZero()
There was a problem hiding this comment.
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.
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.
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: