-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix a couple of bugs in the logic for how AWS metric periods are calculated #32724
Fix a couple of bugs in the logic for how AWS metric periods are calculated #32724
Conversation
This pull request does not have a backport label.
|
…uated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period.
41f45d9
to
19e7073
Compare
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.
Overall the change looks good to me. One question: adding now
as an input parameter for GetStartTimeEndTime
, is it to make the tests easier?
yep! |
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.
Could you add a changelog for this one please? Thanks!!
This pull request is now in conflicts. Could you fix it? 🙏
|
…-interval-calculation
…ulated (#32724) * Fix a couple of bugs in the logic for how AWS metric periods are calcuated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period. * add test that validates intervals are continuous for given periods * update changelog * fix merge error (cherry picked from commit df3733e)
…ulated (#32724) * Fix a couple of bugs in the logic for how AWS metric periods are calcuated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period. * add test that validates intervals are continuous for given periods * update changelog * fix merge error (cherry picked from commit df3733e)
…ulated (#32724) (#32872) * Fix a couple of bugs in the logic for how AWS metric periods are calcuated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period. * add test that validates intervals are continuous for given periods * update changelog * fix merge error (cherry picked from commit df3733e) Co-authored-by: Tom Myers <[email protected]>
…ulated (#32724) (#32871) * Fix a couple of bugs in the logic for how AWS metric periods are calcuated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period. * add test that validates intervals are continuous for given periods * update changelog * fix merge error (cherry picked from commit df3733e) Co-authored-by: Tom Myers <[email protected]>
…ackaging * upstream/main: (109 commits) Add cap_net_raw requirements to heartbeat docs (elastic#32816) apply a quick hotfix for having main working properly (elastic#32934) action: checks for x-pack/libbeat and libbeat (elastic#32754) Update to Go 1.18 in go.mod. (elastic#32940) [heartbeat] disable browser code on windows via build tags (elastic#32939) action: checks for heartbeat and x-pack/heartbeat (elastic#32749) Make event acknowledgment asynchronous in shipper output (elastic#32785) [Automation] Update elastic stack version to 8.5.0-fedc3e60 for testing (elastic#32930) Preallocate memory to reduce GC load (elastic#32905) [Automation] Update elastic stack version to 8.5.0-440e0896 for testing (elastic#32919) Skip broken ceph tests. (elastic#32912) Use non-deprecated docker image for testing jolokia (elastic#32885) update ironbank image product name (elastic#32867) ci: pre-commit stage within Jenkins (elastic#32839) Fix a couple of bugs in the logic for how AWS metric periods are calculated (elastic#32724) [Filebeat] [httpjson] Add support for single string containing multiple relation-types in getRFC5988Link (elastic#32811) [Heartbeat] Update HB k8s template to use <Mi> metric (elastic#32801) action: checks for metricbeat and x-pack/metricbeat (elastic#32748) action: checks for filebeat and x-pack/filebeat (elastic#32746) allow for json/ndjson content type with charset (elastic#32767) ...
…ulated (#32724) * Fix a couple of bugs in the logic for how AWS metric periods are calcuated. Firstly, we clarify that periods are always whole-minute durations. Any period that is less than or in between minutes is rounded up to the next whole-minute. Secondly, we ensure that the resulting time period is always in the past. This stops us getting empty metrics for the current-minute period. Thirdly, we follow the AWS guidelines of aligning periods to whole multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32 for a 5 minute period. * add test that validates intervals are continuous for given periods * update changelog * fix merge error
Firstly, we clarify that periods are always whole-minute durations.
Any period that is less than or in between minutes is rounded up to the
next whole-minute.
Secondly, we ensure that the resulting time period is always in the past.
This stops us getting empty metrics for the current-minute period.
Thirdly, we follow the AWS guidelines of aligning periods to whole
multiples within the hour e.g. 10:25->10:30 instead of 10:27->10:32
for a 5 minute period.
Fixes #32687
Fixes #32640
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.