[9.5](backport #51679) otel(processors): implement PdataProcessor for add_docker_metadata#51916
Conversation
…51679) Adds RunPdata, which enriches a pcommon.Map directly with Docker container metadata. Introduces resolveCIDFromPdata, mirroring Run's three-path CID resolution strategy (log.file.path via sourceProcessor, PID-based cgroup lookup, user-defined match fields) without converting to/from mapstr.M. Parity coverage in TestMatchContainer verifies Run and RunPdata produce identical output. * metricbeat: fix module.NewWrapper call in runner_test.go Upstream commit c2c559c passed a bare *logp.Logger as the third argument to module.NewWrapper, whose signature expects *beat.Info, breaking build/vet. Wrap the logger in &beat.Info{...} to match the API and the other calls in this file. * reuse code between Run/RunPdata * more coverage for Run == RunPdata for negative cases * linter fix (cherry picked from commit 53993f3)
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
TL;DRThe only failure is an unrelated Winlogbeat Windows unit test: winlogbeat/eventlog/TestWindowsEventLogAPI fails while opening the test event log with Access is denied. The PR changes only libbeat/processors/add_docker_metadata, so this does not point to a regression in the PR. Please retry after checking the Windows 2025 agent event-log subscription and privilege configuration. Remediation
Investigation detailsRoot CauseTestWindowsEventLogAPI calls createLog at winlogbeat/eventlog/wineventlog_test.go:167. createLog registers the custom provider and then opens it at winlogbeat/eventlog/wineventlog_test.go:336-341; the failure is reported at line 341 as Access is denied. The underlying reader subscribes to the channel through the Windows Event Log API in winlogbeat/eventlog/wineventlog.go:334-355. The failing test and Winlogbeat event-log implementation are outside this PR's two changed files. Evidence
Verification
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
/test |
Proposed commit message
Adds RunPdata, which enriches a pcommon.Map directly with Docker container metadata. Introduces resolveCIDFromPdata, mirroring Run's three-path CID resolution strategy (log.file.path via sourceProcessor, PID-based cgroup lookup, user-defined match fields) without converting to/from mapstr.M. Parity coverage in TestMatchContainer verifies Run and RunPdata produce identical output.
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.How to test this PR locally
Related issues
This is an automatic backport of pull request #51679 done by [Mergify](https://mergify.com).