elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
20.01k stars 8.25k forks source link

feat(slo): SLO grouping values selector #202364

Closed kdelemme closed 1 week ago

kdelemme commented 1 week ago

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

🏇🏻 Summary

This PR introduces a way to switch from one instance to another for a given SLO. It replaces the current displaying of the grouping key/value in the SLO details page by a searchable combobox of all possible values for each grouping key. The list is searchable and excludes the stale SLO instances.

[!NOTE]

I refactored the existing internal API GET /slos/{id}/_instances which was not in use from within Kibana. The API is now accessible under GET /slos/{id}/_groupings

This new API takes two mandatory fields: groupingKey and instanceId. We use the provided instanceId to derive the term filters on the other groupingKeys (if more than one).

🧬 Testing

  1. Run data forge: node x-pack/scripts/data_forge.js --events-per-cycle 30 --lookback now-1d --dataset fake_stack --install-kibana-assets --kibana-url http://localhost:5601/kibana
  2. Create some SLOs without groups, with 1 group and 2+ groups.
  3. Assert the groupings are displayed correctly
  4. Assert groupings selector are searchable
  5. Assert selecting a new group value will change the URL and load the new instanceId data

https://github.com/user-attachments/assets/8b489904-2e88-4a65-82c2-963a2c1898b4

elasticmachine commented 1 week ago

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

github-actions[bot] commented 1 week ago

:robot: GitHub comments

Expand to view the GitHub comments

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

elasticmachine commented 1 week ago

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
slo 856 862 +6

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 182 183 +1

Async chunks

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

id before after diff
observability 472.0KB 472.2KB +219.0B
slo 849.0KB 855.0KB +6.0KB
synthetics 1.1MB 1.1MB +220.0B
total +6.4KB
Unknown metric groups #### API count | id | [before](https://github.com/elastic/kibana/commit/a662233d8b967d022a32fc9379d338684bf6a413) | [after](https://github.com/elastic/kibana/commit/09626b065ceb98f78af21e0341a3d44ad75cc7be) | diff | | --- | --- | --- | --- | | `@kbn/slo-schema` | 182 | 183 | +1 |

History

cc @kdelemme

kibanamachine commented 1 week ago

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12186170849

kibanamachine commented 1 week ago

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation