Skip to content
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

[SLO] Add timeslice metric indicator #168539

Merged
merged 22 commits into from
Oct 17, 2023

Conversation

simianhacker
Copy link
Member

@simianhacker simianhacker commented Oct 10, 2023

Summary

This PR adds the new Timeslice Metric indicator for SLOs. Due to the nature of these statistical aggregations, this indicator requires the budgeting method to be set to timeslices; we ignore the timeslice threshold in favor of the threshold set in the metric definition.

Users can create SLOs based on the following aggregations:

  • Average
  • Min
  • Max
  • Sum
  • Cardinality
  • Percentile
  • Document count
  • Std. Deviation
  • Last Value

Other notable feature include:

  • The ability to define an equation which supports basic math and logic
  • Users can define a threshold based on the equation for good slices vs bad slices
image

Counter Metric Example

image

CC: @lucasmoore

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@simianhacker simianhacker added Project: Actionable Observability - DEPRECATED Deprecated - Do not use Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Feature:SLO v8.12.0 and removed Project: Actionable Observability - DEPRECATED Deprecated - Do not use labels Oct 12, 2023
@simianhacker simianhacker marked this pull request as ready for review October 12, 2023 19:51
@simianhacker simianhacker requested a review from a team as a code owner October 12, 2023 19:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@kdelemme
Copy link
Contributor

I'm testing it manually at the moment, I have a few suggestions for the UX:

  1. Can we make the FormRow labels invalid when the nested Input is invalid? Like we do for the index selection for example
    In the screenshot below, Aggregation A should be red as well.
Aggregation field Index Field
image image
  1. Should we also disable the "add metric" and 🗑️ icon when the index is not yet selected?
Screenshot
image

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a first pass on the UI, looking promising. I haven't looked at the backend yet

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments but otherwise LGTM.
I've tested locally with different aggregation and all seems to work. I have not verified the math, but I trust the ES aggregation queries.

image

I think we can reuse the threshold in the data preview chart, for the other indicator and use the objective.target 😏 But that can be another PR

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 482 486 +4

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 111 126 +15

Async chunks

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

id before after diff
observability 1.0MB 1.1MB +20.3KB
Unknown metric groups

API count

id before after diff
@kbn/slo-schema 114 129 +15

History

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

cc @kdelemme

@simianhacker simianhacker merged commit befbe10 into elastic:main Oct 17, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 17, 2023
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Oct 18, 2023
## Summary

This PR adds the new Timeslice Metric indicator for SLOs. Due to the
nature of these statistical aggregations, this indicator requires the
budgeting method to be set to `timeslices`; we ignore the timeslice
threshold in favor of the threshold set in the metric definition.

Users can create SLOs based on the following aggregations:
- Average
- Min
- Max
- Sum
- Cardinality
- Percentile
- Document count
- Std. Deviation
- Last Value

Other notable feature include:

- The ability to define an equation which supports basic math and logic
- Users can define a threshold based on the equation for good slices vs
bad slices

<img width="800" alt="image"
src="https://github.com/elastic/kibana/assets/41702/05af1ced-40cd-4a05-9dfc-e83ea7bfb5ab">

### Counter Metric Example

<img width="800" alt="image"
src="https://github.com/elastic/kibana/assets/41702/05eb5a0f-3043-493d-8add-df0d3bf8de02">


CC: @lucasmoore

---------

Co-authored-by: Kevin Delemme <[email protected]>
@simianhacker simianhacker deleted the add-timeslice-metric-indicator branch April 17, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:SLO release_note:enhancement Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants