Skip to content

packetbeat/otel: restore per-stream interface and procs from hybrid agent config - #53301

Open
efd6 wants to merge 1 commit into
elastic:mainfrom
efd6:conformance_testing_packetbeat
Open

efd6 wants to merge 1 commit into
elastic:mainfrom
efd6:conformance_testing_packetbeat

Conversation

@efd6

@efd6 efd6 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

packetbeat/otel: restore per-stream interface and procs from hybrid agent config

When elastic-agent runs packetbeat as an OTel receiver it delivers config
in a hybrid format: the top-level key is protocols (beat-native) but each
list entry contains agent-style per-stream fields including interface,
procs, and data_stream. FromStatic read Interfaces only from the top level
and Procs not at all, so every per-stream interface device and monitored
process list was silently dropped and packetbeat fell back to defaultDevice()
on every deployment.

Extend the protocol-routing loop in FromStatic to also unpack interface and
procs from each entry, matching the approach already used by NewAgentConfig
for the process runtime. Add a defaultDevice() fallback for the case where
neither top-level nor per-stream interfaces are present.

Add a parity test with 16 pre-rendered stream fixtures for the
network_traffic integration.

Note

This is the first of four changes to add behaviour parity checks between the two configuration pathways.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@efd6 efd6 self-assigned this Sep 17, 2026
@efd6 efd6 added enhancement Packetbeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Security-Service Integrations Security Service Integrations Team backport-9.5 Automated backport to the 9.5 branch labels Sep 17, 2026
@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@efd6
efd6 force-pushed the conformance_testing_packetbeat branch 2 times, most recently from 06140ea to 088ce9f Compare September 17, 2026 22:43
…gent config

When elastic-agent runs packetbeat as an OTel receiver it delivers config
in a hybrid format: the top-level key is protocols (beat-native) but each
list entry contains agent-style per-stream fields including interface,
procs, and data_stream. FromStatic read Interfaces only from the top level
and Procs not at all, so every per-stream interface device and monitored
process list was silently dropped and packetbeat fell back to defaultDevice()
on every deployment.

Extend the protocol-routing loop in FromStatic to also unpack interface and
procs from each entry, matching the approach already used by NewAgentConfig
for the process runtime. Add a defaultDevice() fallback for the case where
neither top-level nor per-stream interfaces are present.

Add a parity test with 16 pre-rendered stream fixtures for the
network_traffic integration.

Fixes elastic#53010.
@efd6
efd6 force-pushed the conformance_testing_packetbeat branch from 088ce9f to c862304 Compare September 18, 2026 00:11
@efd6
efd6 marked this pull request as ready for review September 18, 2026 03:20
@efd6
efd6 requested a review from a team as a code owner September 18, 2026 03:20
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

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

Labels

backport-9.5 Automated backport to the 9.5 branch enhancement Packetbeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Security-Service Integrations Security Service Integrations Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

packetbeat: per-stream interface and procs configuration silently dropped under OTel runtime

1 participant