mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
closes https://github.com/elastic/kibana/issues/170247 ## 📝 Summary This PR introduces a new state machine for controlling the new Dataset Quality Summary Panel. As part of this work, we had to introduce a new endpoint to fetch and calculate the Estimated Data in last 24h. ## 💡For Reviewers ### State Machine The new state machine introduces 3 parallel states to fetch the values displayed in the summary panel. In case of failures in any of them, a retry mechanism is introduced to try the fetch 1 more time after 5 seconds interval. If the fetch fails again, we display an error toast notification.  ### New Endpoint A new endpoint `GET /internal/dataset_quality/data_streams/estimated_data` has been introduced to calculate the Estimated Data in last 24h. The endpoint first retrieves the doc count and total size in bytes for `logs-*` and uses them to calculate the average size per doc which is then multiplied by the number of total doc in the last 24h to get an estimate of data in last 24h. ## ✅ Testing 1) Navigate to /app/observability-logs-explorer/dataset-quality 2) The summary panel is displayed at the top of the table 3) Filterations shouldn't affect the data displayed as the panel is completely isolated ## 🎥 Demos - Normal Scenarioc88c3e73
-973e-4dd2-babe-63e2c6ae2dda - Retry On Failuresb952963a
-5d67-472a-bd69-9cd9e49b0ed1 - Failing Again After Max Retries31cb2e4c
-cb90-4490-8bcc-ccb11994f9fa --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
9 lines
408 B
TypeScript
9 lines
408 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
export { formatBytes } from './src/bytes_formatter';
|