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

[Inventory] Inventory plugin #191798

Merged
merged 35 commits into from
Sep 12, 2024
Merged

Conversation

dgieselaar
Copy link
Member

@dgieselaar dgieselaar commented Aug 30, 2024

Description

This PR adds an inventory plugin, which renders an inventory UI. Currently only data streams are rendered. This is part of the LogsAI initiative - basically we need a UI for tasks like structuring data, extracting entities, listing the results etc. This is mostly POC-level stuff. Eventually some of this code might be handed over to ECO but let's cross that bridge when we get to it.

Notes for reviewers:

@elastic/appex-ai-infra @elastic/security-generative-ai: added a truncateList utility function that takes the first n elements of an array and appends a {l-n} more string value if there are more values than n. Really simple but I expect will also be very often used because we cannot send a huge amount of items to the LLM.

@elastic/kibana-core @elastic/kibana-operations: just boiler plate stuff for adding a new plugin (and thank you for enabling us to run quick_checks locally!

@elastic/obs-knowledge-team: added support for streaming using an Observable.

@elastic/obs-ux-management-team: added links to the Inventory UI in the Observability plugin

@elastic/obs-entities: I've added an entity manager client to be able to fetch entity definitions on the server. Maybe there's a better way? LMK.

@elastic/obs-ux-logs-team: added a deeplink to the Inventory UI. I've also moved CODEOWNERS for this package to @elastic/obs-ux-management-team as they own the Observability plugin where this is mostly used.

@obltmachine
Copy link

🤖 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!)

@dgieselaar dgieselaar marked this pull request as ready for review August 30, 2024 08:05
@dgieselaar dgieselaar requested review from a team as code owners August 30, 2024 08:05
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Aug 30, 2024
@@ -362,7 +362,7 @@ packages/deeplinks/devtools @elastic/kibana-management
packages/deeplinks/fleet @elastic/fleet
packages/deeplinks/management @elastic/kibana-management
packages/deeplinks/ml @elastic/ml-ui
packages/deeplinks/observability @elastic/obs-ux-logs-team
packages/deeplinks/observability @elastic/obs-ux-management
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
packages/deeplinks/observability @elastic/obs-ux-management
packages/deeplinks/observability @elastic/obs-ux-management-team

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks!

@@ -421,6 +436,7 @@ export class Plugin
sortKey: 100,
entries: [
...overviewLink,
...inventoryLink,
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is POC, should this be behind feature flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

the plugin itself is disabled by default, I don't want this to leak to the UI anywhere to regular users so I haven't used an advanced setting or anything

@dgieselaar dgieselaar added release_note:skip Skip the PR/issue when compiling release notes v8.16.0 labels Aug 30, 2024
@dgieselaar dgieselaar requested a review from a team as a code owner August 30, 2024 13:14
Copy link
Contributor

@kpatticha kpatticha left a comment

Choose a reason for hiding this comment

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

LGTM 🥳

Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing in here, not even a one-liner??

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add a one-liner!

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

Add something to the README, even if it's a one liner. Remember that our code is open, in a public repo, everyone needs to know what a plugin does.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 11, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
entityManager 15 23 +8
inventory - 125 +125
observabilityAIAssistant 91 104 +13
total +146

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/server-route-repository 38 42 +4
@kbn/server-route-repository-client 9 15 +6
@kbn/server-route-repository-utils 26 30 +4
@kbn/sse-utils - 19 +19
@kbn/sse-utils-client - 1 +1
@kbn/sse-utils-server - 2 +2
entityManager 17 20 +3
inference 39 44 +5
inventory - 5 +5
observability 696 698 +2
total +51

Async chunks

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

id before after diff
apm 3.5MB 3.5MB +90.0B
inventory - 48.5KB +48.5KB
observability 463.5KB 463.7KB +225.0B
total +48.8KB

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
@kbn/server-route-repository-utils 0 2 +2
@kbn/sse-utils - 3 +3
@kbn/sse-utils-client - 1 +1
apm 118 119 +1
entityManager 2 3 +1
inference 13 12 -1
inventory - 3 +3
total +10

Page load bundle

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

id before after diff
entityManager 4.1KB 6.8KB +2.7KB
inference 5.6KB 5.7KB +68.0B
inventory - 14.5KB +14.5KB
observability 102.6KB 102.9KB +242.0B
observabilityAIAssistant 43.4KB 46.0KB +2.6KB
total +20.1KB
Unknown metric groups

API count

id before after diff
@kbn/server-route-repository 38 42 +4
@kbn/server-route-repository-client 9 15 +6
@kbn/server-route-repository-utils 26 30 +4
@kbn/sse-utils - 19 +19
@kbn/sse-utils-client - 1 +1
@kbn/sse-utils-server - 2 +2
entityManager 17 20 +3
inference 41 49 +8
inventory - 5 +5
observability 703 705 +2
total +54

async chunk count

id before after diff
inventory - 1 +1

ESLint disabled in files

id before after diff
inventory - 2 +2

ESLint disabled line counts

id before after diff
entityManager 1 2 +1

Total ESLint disabled count

id before after diff
entityManager 1 2 +1
inventory - 2 +2
total +3

History

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

cc @kpatticha

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mykolaharmash mykolaharmash left a comment

Choose a reason for hiding this comment

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

Onboarding change LGTM

@dgieselaar dgieselaar removed the request for review from afharo September 12, 2024 10:48
@dgieselaar dgieselaar enabled auto-merge (squash) September 12, 2024 10:48
@dgieselaar dgieselaar merged commit 98aa1ab into elastic:main Sep 12, 2024
46 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 12, 2024
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 ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.