kibana icon indicating copy to clipboard operation
kibana copied to clipboard

feat(slo): Consider empty slice as good slice for sli calculation purposes on timeslice budgeting method

Open kdelemme opened this issue 10 months ago • 3 comments

Resolves https://github.com/elastic/kibana/issues/181577

🏎️ Summary

We used to calculate the SLI value of Timeslices SLOs based on the observed good and total events. The good events was the sum of isGoodSlice, while the total events was the value_count of isGoodSlice. When there is no data, the rollup documents are not created, and therefore the good and total values are not taking these slices into account.

This PR changes this behaviour. For a Timeslices SLO, we always use the total slices available in the time window, e.g. 10080 for a 7d rolling or weekly calendar aligned. And we compute the SLI as 1 - (total - good) / total_slices. We do this change in the different services that fetch the SLI rollup documents in order to calculate the SLI value. And also in the summary transform for Timeslices SLO.

Scenario Good Events (observed) Total Events (observed) Bad Events (observed) Total Slices In Period SLI (old) SLI (new)
7d rolling, 1m slice, no missing data 10000 10080 80 10080 0.99206349 0.99206349
7d rolling, 60m slice, no missing data 158 168 10 168 0.94047619 0.94047619
7d rolling, 1m slice, missing data 100 120 20 10080 0.83333333 0.99801587

Release note

Timeslice SLOs calculation for the sli value changed to include the no data slices as good slice.

kdelemme avatar Apr 26 '24 16:04 kdelemme

:robot: GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

apmmachine avatar Apr 26 '24 16:04 apmmachine

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

elasticmachine avatar Apr 26 '24 16:04 elasticmachine

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/slo-schema 179 178 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
slo 726.3KB 726.3KB -57.0B

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5871 +5871
total size - 6.7MB +6.7MB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observability 151.1KB 151.1KB -60.0B
Unknown metric groups

API count

id before after diff
@kbn/slo-schema 179 178 -1

History

  • :green_heart: Build #206398 succeeded 0ac33cd06147361374d3c1f46f2bef06d4bbd7de

To update your PR or re-run it, just comment with: @elasticmachine merge upstream

kibana-ci avatar Apr 30 '24 16:04 kibana-ci

💚 All backports created successfully

Status Branch Result
8.14

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kdelemme avatar May 01 '24 15:05 kdelemme