As part of the On-Week project I looked into how we can generate an SLO from an existing visualization. The idea is to add a new Create SLO option to the Lens visualization, which links to the slo creation form prefilled with the data view, query, filter etc. This is going to be useful for SREs, since they won't have to do the double work of defining again the queries, data view etc.
Implementation
The challenge I can already see here, is how we can map the different Lens functions into the proper SLI definition (indicator type, queries etc). There is already the option Explore Data in Discover in the Lens embeddable, so can check how they do it and reuse stuff from there)
✔️ Acceptance criteria
Add a new ui action on the Lens embeddable called Create SLO. (Linking here an example on how to add a ui action on an embeddable)
Sniff the metric the visualization is using
Navigate to observability slo create page with the following information prefilled
indicator type
data view
total query
good query
filter
timestamp field
Thanks to @elkargig and @framsouza for the great idea!
Relates to https://github.com/elastic/kibana/issues/174996
🍒 Summary
As part of the On-Week project I looked into how we can generate an SLO from an existing visualization. The idea is to add a new
Create SLO
option to the Lens visualization, which links to the slo creation form prefilled with the data view, query, filter etc. This is going to be useful for SREs, since they won't have to do the double work of defining again the queries, data view etc.Implementation
The challenge I can already see here, is how we can map the different Lens functions into the proper SLI definition (indicator type, queries etc). There is already the option
Explore Data in Discover
in the Lens embeddable, so can check how they do it and reuse stuff from there)✔️ Acceptance criteria
ui action
on the Lens embeddable calledCreate SLO
. (Linking here an example on how to add a ui action on an embeddable)Thanks to @elkargig and @framsouza for the great idea!
cc @grabowskit