NewFactory for beatreceivers takes default home and data dirs#49327
NewFactory for beatreceivers takes default home and data dirs#49327leehinman wants to merge 2 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsJust comment with:
|
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
eed310e to
a60c17a
Compare
|
Workflow run Root cause from logs:
Recommended minimal fix:
Suggested verification before re-run:
Tests run by me in this investigation: none locally; analysis was from Actions logs and PR diff only. What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
a60c17a to
1b5ccd3
Compare
|
Workflow run
Recommended action: no fix needed for this run. If you want proactive hardening, keep this workflow as-is and monitor subsequent runs after new commits for regressions. Tests/log checks run:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Root cause from the log:
Recommended minimal fix:
PR context captured:
Tests run here:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
1b5ccd3 to
277f542
Compare
|
I investigated workflow run
Root cause analysis: no failure occurred in this run, so no remediation is required. Tests/checks observed:
Follow-up:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Workflow run Summary:
Root cause of failure: not applicable (no failure present). What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
277f542 to
651bbc8
Compare
|
Checked workflow run
Root cause of failure: N/A (run passed). No follow-up action is needed unless a different run ID is failing. What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR changes filebeat and metricbeat receiver factories to NewFactory(home, data string), supplying default beat.path.home and beat.path.data via the factory. Config structs now include a custom Unmarshal(conf *confmap.Conf) that calls DeDotKeys to expand dotted keys into nested maps; Beatconfig fields changed from map[string]interface{} to map[string]any. Call sites and tests were updated to pass explicit home/data arguments; new tests cover DeDotKeys and setNested behavior. Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
|
Workflow run Summary of what I verified:
Recommended action:
Tests run in this investigation:
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Workflow run
No remediation is required for this run. If you want, I can instead analyze a failing run ID for this PR. What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
9517fb0 to
cb04ab8
Compare
Proposed commit message
Change
NewFactoryfor filebeat receiver and metricbeat receiver to take default paths forhomeanddatapath. This is just the default. When the receiver is instantiated the configuration setting forpath.homeandpath.datawill take precedence if given. This will allow the otel collector to provide a "sane" default for these settings so the user doesn't have to explicitly give them in the configuration.For example elastic-agent can set
hometo be https://github.com/elastic/elastic-agent/blob/e3b9b4fba4f3c0900ccb751da994da76a2218d0c/internal/pkg/agent/application/paths/common.go#L215 anddatato be https://github.com/elastic/elastic-agent/blob/e3b9b4fba4f3c0900ccb751da994da76a2218d0c/internal/pkg/agent/application/paths/common.go#L196-L198Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
This does change the signature of
NewFactory, callers will have to supply arguments. Giving the empty string will give the same behavior as before.Author's Checklist
How to test this PR locally
elastic-agent otel --config <path to config>,With PR the
activemqmodule will be found, without it won't.Related issues
Use cases
Screenshots
Logs