Skip to content

[Streams] Significant events view#220197

Merged
dgieselaar merged 33 commits intoelastic:mainfrom
dgieselaar:significant-events-ui-crud
Jul 7, 2025
Merged

[Streams] Significant events view#220197
dgieselaar merged 33 commits intoelastic:mainfrom
dgieselaar:significant-events-ui-crud

Conversation

@dgieselaar
Copy link
Contributor

@dgieselaar dgieselaar commented May 6, 2025

Implements a CRUD-ui for significant events. Generated events will follow separately.

@dgieselaar dgieselaar self-assigned this May 6, 2025
@dgieselaar dgieselaar added release_note:enhancement backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project v9.1.0 v8.19.0 labels May 6, 2025
dgieselaar and others added 6 commits June 8, 2025 15:19
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
@dgieselaar dgieselaar marked this pull request as ready for review June 9, 2025 17:23
@dgieselaar dgieselaar requested review from a team as code owners June 9, 2025 17:23
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jun 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

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

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

I've done a first pass and tested locally, and overall works well.

Just a few comments around the indices used and the feature flag used for the tabs.

setQueryToEdit(undefined);
}}
query={queryToEdit}
name={definition?.stream.name ?? ''}
Copy link
Contributor

Choose a reason for hiding this comment

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

should not be undefined

{i18n.translate('xpack.streams.significantEvents.addSignificantEventButton', {
defaultMessage: 'Add significant event query',
})}
</EuiButton>{' '}
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
</EuiButton>{' '}
</EuiButton>


<EuiFlexItem grow={false}>
<SignificantEventsTable
name={definition?.stream.name}
Copy link
Contributor

Choose a reason for hiding this comment

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

should be defined

Comment on lines +92 to +95
const tabs =
features.significantEvents !== undefined
? getStreamDetailTabs({ definition, router, features })
: undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be

Suggested change
const tabs =
features.significantEvents !== undefined
? getStreamDetailTabs({ definition, router, features })
: undefined;
const tabs = getStreamDetailTabs({ definition, router, features });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want the tabs to be displayed at all until we know whether sig events is available or not (which is async due to the license), otherwise there's a content change (2 tabs => 3 tabs) which I'd like to avoid.

});

const response = (await scopedClusterClient.asCurrentUser.search({
index: name,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the preview should query child streams as well, since the ES|QL query searches them

Suggested change
index: name,
index: `${name},${name}.*`,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cheers, now calling a helper function that was already used in other places

},
dataViewSpec: {
id: v4(),
title: name,
Copy link
Contributor

Choose a reason for hiding this comment

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

same here when building the data view, we should include the child

Suggested change
title: name,
title: `${name},${name}.*`,

@dgieselaar
Copy link
Contributor Author

@elasticmachine merge upstream

@kdelemme
Copy link
Contributor

kdelemme commented Jul 3, 2025

@elastic/core-docs Can we get a review?

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 7, 2025

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 471 497 +26

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/streams-schema 231 239 +8
streams 24 25 +1
total +9

Async chunks

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

id before after diff
streamsApp 556.8KB 577.9KB +21.1KB

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/streams-schema 16 15 -1
streams 26 27 +1
total -0

Page load bundle

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

id before after diff
streams 7.5KB 7.5KB +22.0B
Unknown metric groups

API count

id before after diff
@kbn/streams-schema 240 248 +8
streams 25 26 +1
total +9

async chunk count

id before after diff
streamsApp 19 21 +2

ESLint disabled line counts

id before after diff
streams 3 4 +1

miscellaneous assets size

id before after diff
streamsApp 304.0KB 349.6KB +45.7KB

Total ESLint disabled count

id before after diff
streams 7 8 +1

History

cc @dgieselaar

@dgieselaar dgieselaar merged commit 1458854 into elastic:main Jul 7, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.1:
- [scout] adding ESLint rules for test package imports (#225791)

Manual backport

To create the backport manually run:

node scripts/backport --pr 220197

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.1:
- [scout] adding ESLint rules for test package imports (#225791)

Manual backport

To create the backport manually run:

node scripts/backport --pr 220197

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 Jul 8, 2025
@kibanamachine
Copy link
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 220197 locally
cc: @dgieselaar

@tonyghiani tonyghiani added backport:version Backport to applied version labels and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Jul 9, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 9, 2025
Implements a CRUD-ui for significant events. Generated events will
follow separately.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
(cherry picked from commit 1458854)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 220197

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 9, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[Streams] Significant events view
(#220197)](#220197)

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

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

<!--BACKPORT [{"author":{"name":"Dario
Gieselaar","email":"dario.gieselaar@elastic.co"},"sourceCommit":{"committedDate":"2025-07-07T11:37:24Z","message":"[Streams]
Significant events view (#220197)\n\nImplements a CRUD-ui for
significant events. Generated events will\nfollow
separately.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>","sha":"14588547ad5df3d5da27f3c79040c75b5e7dff66","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","ci:project-deploy-observability","backport:version","Feature:Streams","v9.1.0","v8.19.0","v9.2.0"],"title":"[Streams]
Significant events
view","number":220197,"url":"https://github.com/elastic/kibana/pull/220197","mergeCommit":{"message":"[Streams]
Significant events view (#220197)\n\nImplements a CRUD-ui for
significant events. Generated events will\nfollow
separately.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>","sha":"14588547ad5df3d5da27f3c79040c75b5e7dff66"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220197","number":220197,"mergeCommit":{"message":"[Streams]
Significant events view (#220197)\n\nImplements a CRUD-ui for
significant events. Generated events will\nfollow
separately.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>","sha":"14588547ad5df3d5da27f3c79040c75b5e7dff66"}}]}]
BACKPORT-->

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
@dgieselaar dgieselaar added backport:skip This PR does not require backporting and removed v8.19.0 labels Jul 11, 2025
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
Implements a CRUD-ui for significant events. Generated events will
follow separately.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project Feature:Streams This is the label for the Streams Project release_note:enhancement v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants