Repository navigation
[9.6](backport #53348) [beatreceiver] Fix manager.Enabled() usages in OTel mode - #54084
Conversation
* Fix manager.enabled usages * fix tests * fix tests * fix packetbeat * address review comments * Set UnderAgent in TestUserAgentString userAgentMode and userAgentUnprivilegedMode now read the process-wide management.UnderAgent() instead of Manager.Enabled(), so the test has to drive management mode through that flag rather than the fake manager. Assisted-By: Cursor Co-authored-by: Cursor <cursoragent@cursor.com> * fix user-agent for hbreceiver --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 0d42775)
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
Dependency review finished without posting an analysis comment. If you expected a review, push a new commit to this pull request (or close and reopen it) to try again. Workflow run: https://github.com/elastic/beats/actions/runs/42043789993 |
This comment has been minimized.
This comment has been minimized.
|
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏 |
|
This requires a 9.6 backport of this change #53654 |
TL;DRThis Buildkite failure is infrastructure/tooling, not a test/code regression in this PR: the agent failed to download Remediation
Investigation detailsRoot CauseClassification: Infrastructure. The job fails before tests execute because
Given this sequence, the failure is in environment bootstrap (tool fetch), not in PR logic/tests. Evidence
Verification
Follow-up
What is this? | From workflow: Observability Agentic Workflow — Status Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏 |
|
This pull request is merged. |
|
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏 |
Proposed commit message
OTel manager returns false when
manager.Enabled()is referenced across the codebase whereas the elastic-agent manager returns true. This caused certain side effects. See issue #53106This PR removes the
Enabled()method from thev2Managerinterface and the beats repo will now rely onmanagement.UnderAgent()method to evaluate conditionals.This PR also introduces a new method called
func ConfigFromControlProtocol() boolto differentiate beats running under elastic-agent process mode vs in OTel mode. There are certain code paths that must not be invoked by the receivers but should be elastic-agent.Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
FIxes any bug introduced by otel manager returning false for
manager.Enabled()conditionsRelated issues
This is an automatic backport of pull request #53348 done by [Mergify](https://mergify.com).