Skip to content

[streams] lifecycle - ingestion and total docs metadata#210301

Merged
klacabane merged 34 commits intoelastic:mainfrom
klacabane:120-streams-lifecycle-docs-count-size
Feb 17, 2025
Merged

[streams] lifecycle - ingestion and total docs metadata#210301
klacabane merged 34 commits intoelastic:mainfrom
klacabane:120-streams-lifecycle-docs-count-size

Conversation

@klacabane
Copy link
Copy Markdown
Contributor

@klacabane klacabane commented Feb 9, 2025

Adds avg ingestion per day, total doc count and ingestion rate graph to the lifecycle view.

We use the dataset quality plugin to compute these values. I've added a query string to optionally retrieve the creation date of a data stream in the data_streams/stats endpoint.

Screenshot 2025-02-11 at 17 39 13


@elastic/obs-ux-logs-team the change in dataset quality involves the optional retrieval of the data streams creation date in the /stats endpoint. There are other ways in dataset quality to get these informations but they rely on queries to compute the data. In our case these queries will always be unbounded and using the /stats would be more efficient as it relies on cluster state.

@klacabane klacabane added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project v9.1.0 v8.19.0 labels Feb 11, 2025
Comment on lines +48 to +49
t.union([t.type({ types: typesRt }), t.type({ datasetQuery: t.string })]),
t.partial({ includeCreationDate: toBooleanRt }),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We either use types or datasetQuery in the route. Updated the type accordingly

@klacabane klacabane marked this pull request as ready for review February 11, 2025 17:03
@klacabane klacabane requested review from a team as code owners February 11, 2025 17:03
@klacabane klacabane requested a review from yngrdyn February 11, 2025 17:03
@tonyghiani
Copy link
Copy Markdown
Contributor

perhaps your environment is not in the expected state since the change updated the types of this endpoint. I can't replicate, could you try bootstrap?

Bootstrap fixed it, as I mentioned above another issue is it get stuck on the loading state for any error that might occur.

@klacabane
Copy link
Copy Markdown
Contributor Author

@yngrdyn @tonyghiani should be ready for another review

@klacabane
Copy link
Copy Markdown
Contributor Author

klacabane commented Feb 14, 2025

9f1357f updates the datepicker to use the one already defined throughout the app which shares the range already defined. We can revisit the default in lifecycle table if that does not make sense

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 298 302 +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
datasetQuality 14 31 +17

Async chunks

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

id before after diff
datasetQuality 240.2KB 240.3KB +41.0B
streamsApp 279.9KB 283.5KB +3.6KB
total +3.7KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
datasetQuality 8 11 +3

Page load bundle

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

id before after diff
datasetQuality 19.9KB 20.0KB +52.0B
streamsApp 6.8KB 7.1KB +302.0B
total +354.0B
Unknown metric groups

API count

id before after diff
datasetQuality 14 31 +17

ESLint disabled line counts

id before after diff
streamsApp 8 7 -1

Total ESLint disabled count

id before after diff
streamsApp 11 10 -1

History

Copy link
Copy Markdown
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the changes

Copy link
Copy Markdown
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@klacabane klacabane merged commit 95b3f6e into elastic:main Feb 17, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- 🌊 Streams - Better error handling (#211197)

Manual backport

To create the backport manually run:

node scripts/backport --pr 210301

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 19, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 210301 locally

@klacabane
Copy link
Copy Markdown
Contributor Author

💚 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

klacabane added a commit to klacabane/kibana that referenced this pull request Feb 20, 2025
Adds avg ingestion per day, total doc count and ingestion rate graph to
the lifecycle view.

We use the dataset quality plugin to compute these values. I've added a
query string to optionally retrieve the creation date of a data stream
in the `data_streams/stats` endpoint.

![Screenshot 2025-02-11 at 17 39
13](https://github.com/user-attachments/assets/9242ecbc-ebee-43da-b742-fbc0d0997bc2)

-----

@elastic/obs-ux-logs-team the change in dataset quality involves the
optional retrieval of the data streams creation date in the `/stats`
endpoint. There are other ways in dataset quality to get these
informations but they rely on queries to compute the data. In our case
these queries will always be unbounded and using the `/stats` would be
more efficient as it relies on cluster state.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 95b3f6e)
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

klacabane added a commit that referenced this pull request Feb 20, 2025
… (#211875)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[streams] lifecycle - ingestion and total docs metadata
(#210301)](#210301)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Lacabane","email":"kevin.lacabane@elastic.co"},"sourceCommit":{"committedDate":"2025-02-17T12:35:20Z","message":"[streams]
lifecycle - ingestion and total docs metadata (#210301)\n\nAdds avg
ingestion per day, total doc count and ingestion rate graph to\nthe
lifecycle view.\n\nWe use the dataset quality plugin to compute these
values. I've added a\nquery string to optionally retrieve the creation
date of a data stream\nin the `data_streams/stats`
endpoint.\n\n![Screenshot 2025-02-11 at 17
39\n13](https://github.com/user-attachments/assets/9242ecbc-ebee-43da-b742-fbc0d0997bc2)\n\n-----\n\n@elastic/obs-ux-logs-team
the change in dataset quality involves the\noptional retrieval of the
data streams creation date in the `/stats`\nendpoint. There are other
ways in dataset quality to get these\ninformations but they rely on
queries to compute the data. In our case\nthese queries will always be
unbounded and using the `/stats` would be\nmore efficient as it relies
on cluster state.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"95b3f6e14da782208dc701c46e7c8bbd77cc55e1","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:version","Feature:Streams","v9.1.0","v8.19.0"],"title":"[streams]
lifecycle - ingestion and total docs
metadata","number":210301,"url":"https://github.com/elastic/kibana/pull/210301","mergeCommit":{"message":"[streams]
lifecycle - ingestion and total docs metadata (#210301)\n\nAdds avg
ingestion per day, total doc count and ingestion rate graph to\nthe
lifecycle view.\n\nWe use the dataset quality plugin to compute these
values. I've added a\nquery string to optionally retrieve the creation
date of a data stream\nin the `data_streams/stats`
endpoint.\n\n![Screenshot 2025-02-11 at 17
39\n13](https://github.com/user-attachments/assets/9242ecbc-ebee-43da-b742-fbc0d0997bc2)\n\n-----\n\n@elastic/obs-ux-logs-team
the change in dataset quality involves the\noptional retrieval of the
data streams creation date in the `/stats`\nendpoint. There are other
ways in dataset quality to get these\ninformations but they rely on
queries to compute the data. In our case\nthese queries will always be
unbounded and using the `/stats` would be\nmore efficient as it relies
on cluster state.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"95b3f6e14da782208dc701c46e7c8bbd77cc55e1"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210301","number":210301,"mergeCommit":{"message":"[streams]
lifecycle - ingestion and total docs metadata (#210301)\n\nAdds avg
ingestion per day, total doc count and ingestion rate graph to\nthe
lifecycle view.\n\nWe use the dataset quality plugin to compute these
values. I've added a\nquery string to optionally retrieve the creation
date of a data stream\nin the `data_streams/stats`
endpoint.\n\n![Screenshot 2025-02-11 at 17
39\n13](https://github.com/user-attachments/assets/9242ecbc-ebee-43da-b742-fbc0d0997bc2)\n\n-----\n\n@elastic/obs-ux-logs-team
the change in dataset quality involves the\noptional retrieval of the
data streams creation date in the `/stats`\nendpoint. There are other
ways in dataset quality to get these\ninformations but they rely on
queries to compute the data. In our case\nthese queries will always be
unbounded and using the `/stats` would be\nmore efficient as it relies
on cluster state.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"95b3f6e14da782208dc701c46e7c8bbd77cc55e1"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 20, 2025
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
Adds avg ingestion per day, total doc count and ingestion rate graph to
the lifecycle view.

We use the dataset quality plugin to compute these values. I've added a
query string to optionally retrieve the creation date of a data stream
in the `data_streams/stats` endpoint.

![Screenshot 2025-02-11 at 17 39
13](https://github.com/user-attachments/assets/9242ecbc-ebee-43da-b742-fbc0d0997bc2)

-----

@elastic/obs-ux-logs-team the change in dataset quality involves the
optional retrieval of the data streams creation date in the `/stats`
endpoint. There are other ways in dataset quality to get these
informations but they rely on queries to compute the data. In our case
these queries will always be unbounded and using the `/stats` would be
more efficient as it relies on cluster state.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants