Skip to content

[8.19] [Streams 🌊] Enrichment sampling data sources (#219736)#224794

Merged
kibanamachine merged 1 commit intoelastic:8.19from
kibanamachine:backport/8.19/pr-219736
Jun 23, 2025
Merged

[8.19] [Streams 🌊] Enrichment sampling data sources (#219736)#224794
kibanamachine merged 1 commit intoelastic:8.19from
kibanamachine:backport/8.19/pr-219736

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## 📓 Summary

Closes elastic#218408

This work initially started with the introduction of a simple search bar
on the streams enrichment samples, but as we realized it didn't fit well
with the requirements for a smooth simulation experience, we moved in
another direction.

## Data sources

As we want to let users pull documents from multiple sources to simulate
their processors (such as docs from Discover, failure store, custom
documents pasted into the simulator, etc...), this work introduces a
data source entity in the simulation playground.
On top of how it used to work, it converts the random samples previously
fetched automatically to a dedicated data source.
As this becomes now a scalable concept, we provide users with the
ability to add/remove/enable different data sources for the same
simulation:
- **Random samples**: This is always available by default to have at
least a data source always available; it can still be enabled/disabled
on demand.
- **KQL search**: Provides a KQL search bar, similar to the one found in
Discover and across Kibana, which enables patterns for pulling documents
into this page from Discover or elsewhere.
- **Custom samples**: Paste raw documents that will be used among the
other data sources for the whole simulation.

## 💡 Reviewer hints

- The data fetching now relies on the `data` plugin interfaces as we
needed a more capable API than the `_sample` one (now removed), and it
aligns with the data fetching practice used for the partitioning page.
- The data source can behave differently depending on its state
(enabled/disabled). To treat it as an isolated concept, a representing
actor machine is introduced and the root streamEnrichment machine
coordinates event-based communication as it happens already for the
processors' instantiation and management.
- The data sources are consistently persisted to the URL, with a couple
of exceptions:
- The `Custom samples` data source is not persisted, as it's not only
descriptive of the data source configuration but it also holds the
custom samples defined by the user. This could easily hit the URL
limits, so we warn the user this won't be persisted anyhow.
- The `Random samples` data source is always available and restored in
the URL to guarantee a data source available on the page.

(cherry picked from commit b759ebb)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jun 23, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) June 23, 2025 05:50
@kibanamachine kibanamachine merged commit 734a219 into elastic:8.19 Jun 23, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 465 485 +20

Async chunks

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

id before after diff
streamsApp 546.0KB 568.6KB +22.6KB

Page load bundle

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

id before after diff
streamsApp 10.2KB 10.4KB +202.0B
Unknown metric groups

async chunk count

id before after diff
streamsApp 7 8 +1

ESLint disabled line counts

id before after diff
streamsApp 9 8 -1

Total ESLint disabled count

id before after diff
streamsApp 13 12 -1

cc @tonyghiani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants