-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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(slo): Use correct calendar period #199873
fix(slo): Use correct calendar period #199873
Conversation
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💚 Build Succeeded
Metrics [docs]
History
|
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.
Code LGTM, changes seems to make sense to me !!
Starting backport for target branches: 8.15, 8.16, 8.x |
(cherry picked from commit 3cbdcc3)
(cherry picked from commit 3cbdcc3)
(cherry picked from commit 3cbdcc3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.16`: - [fix(slo): Use correct calendar period (#199873)](#199873) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo): Use correct calendar period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kevin Delemme <[email protected]>
# Backport This will backport the following commits from `main` to `8.x`: - [fix(slo): Use correct calendar period (#199873)](#199873) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo): Use correct calendar period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kevin Delemme <[email protected]>
# Backport This will backport the following commits from `main` to `8.15`: - [fix(slo): Use correct calendar period (#199873)](#199873) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo): Use correct calendar period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo): Use correct calendar period (#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kevin Delemme <[email protected]>
Resolves #199872
🎯 Summary
For a Occurrences and Calendar Aligned based SLO, we used to compute the summary looking at the previous period defined as now-7days (for a weekly calendar aligned) or now-1 month (for a monthly calendar aligned).
This is obviously wrong since we should compute the summary using only the data from the beginning of the current week or current month.
The fix only required to change the lower bound of the range filter to be either
now/w
ornow/M
which would translate to the beginning of the week or the month, for a calendar aligned SLO.Release note
Fix the summary calculation for a calendar aligned and occurrences based SLO