Skip to content

[Observability:Streams][Streamlang] Add a network direction processor#250894

Merged
couvq merged 30 commits intoelastic:mainfrom
couvq:streamlang_network_direction_processor
Feb 19, 2026
Merged

[Observability:Streams][Streamlang] Add a network direction processor#250894
couvq merged 30 commits intoelastic:mainfrom
couvq:streamlang_network_direction_processor

Conversation

@couvq
Copy link
Copy Markdown
Contributor

@couvq couvq commented Jan 29, 2026

Closes https://github.com/elastic/streams-program/issues/569

Description

This PR introduces a network_direction processor to Streamlang which calculates the network direction given a source IP address, destination IP address, and a list of internal networks. It uses the network_direction processor for ingest pipeline transpilation and it uses the new NETWORK_DIRECTION function for ES|QL transpilation.

Demo

Screen.Recording.2026-02-03.at.3.18.35.PM.mov

@couvq couvq added backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes Team:obs-onboarding Observability Onboarding Team Feature:Streams This is the label for the Streams Project v9.4.0 labels Jan 29, 2026
@couvq couvq force-pushed the streamlang_network_direction_processor branch from 506dcfb to 448ef36 Compare February 2, 2026 15:23
@elastic elastic deleted a comment from elasticmachine Feb 3, 2026
@couvq couvq marked this pull request as ready for review February 3, 2026 20:37
@couvq couvq requested review from a team as code owners February 3, 2026 20:37
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-onboarding-team (Team:obs-onboarding)

@couvq couvq requested review from a team as code owners February 3, 2026 21:01
@couvq
Copy link
Copy Markdown
Contributor Author

couvq commented Feb 12, 2026

Issue: Missing React key on Fragment

In internal_networks_selector.tsx, the .map() renders a bare fragment <> that wraps EuiCheckableCard + EuiSpacer, but the key prop is placed on EuiCheckableCard instead of the fragment. Since <> (shorthand fragment) doesn't accept props, React will emit a key warning for the list items.

// Current (key is on inner element, not the fragment):
{internalNetworksOptions.map(({ id, label, content }) => (
  <>
    <EuiCheckableCard key={id} ...>
    <EuiSpacer size="s" />
  </>
))}

// Should be:
{internalNetworksOptions.map(({ id, label, content }) => (
  <React.Fragment key={id}>
    <EuiCheckableCard id={id} ...>
    <EuiSpacer size="s" />
  </React.Fragment>
))}

Fixed with 8b78167

Copy link
Copy Markdown
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Nice, works great 👌

Image

Just a question about the field selection before I approve. Usually we allow the suggetions plus free form selection, but here it looks like there's no free form option. Is that on purpose?

Image

vs

Image

@couvq
Copy link
Copy Markdown
Contributor Author

couvq commented Feb 16, 2026

Nice, works great 👌

Image Just a question about the field selection before I approve. Usually we allow the suggetions plus free form selection, but here it looks like there's no free form option. Is that on purpose? Image vs Image

@Kerry350 My intention behind that was to prevent the "add as a custom field" default option as the custom field would be empty.

Copy link
Copy Markdown
Member

@mdbirnstiehl mdbirnstiehl left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #3 / ChangePasswordModal render disables submit button when passwords do not match
  • [job] [logs] Scout: [ observability / apm ] plugin / local-stateful-classic - Service map - accessibility - keyboard navigation works correctly

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
datasetQuality 1201 1202 +1
streamsApp 1741 1745 +4
total +5

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/streamlang 439 455 +16

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/streamlang 24 25 +1

Async chunks

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

id before after diff
datasetQuality 576.3KB 577.4KB +1.1KB
streamsApp 1.7MB 1.7MB +8.6KB
total +9.7KB
Unknown metric groups

API count

id before after diff
@kbn/streamlang 513 530 +17

History

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 Feature:Streams This is the label for the Streams Project release_note:feature Makes this part of the condensed release notes Team:obs-onboarding Observability Onboarding Team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants