-
Notifications
You must be signed in to change notification settings - Fork 197
[8.19] (backport #10412) fix: do not report agent managed otel extensions statuses #10449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cherry-pick of d8f1dae has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This pull request has not been merged yet. Could you please review and merge it @pkoutsovasilis? 🙏 |
According to me, yes we should have it in 8.19 even if it shouldn't be use there. |
I agree with Pierre. It was blocked by #10232, but now it can go in. |
This pull request is now in conflicts. Could you fix it? 🙏
|
* fix: do not report agent managed extensions statuses * fix: clone reported collector status for subprocess to avoid mutations to the internal currentStatus ref * fix: unit-test race conditions * fix: typo and actually assign collectorMetricsPort in unit-test (cherry picked from commit d8f1dae) # Conflicts: # internal/pkg/otel/manager/execution_subprocess.go # internal/pkg/otel/manager/manager.go # Conflicts: # internal/pkg/otel/manager/execution_subprocess.go
16d2efd
to
8edf43a
Compare
💚 Build Succeeded
History
|
thanks for the assist @ycombinator 🙏 |
What does this PR do?
This PR ensures that agent-managed extensions (such as
beatsauth
,elastic_diagnostics
, and the Agent’s internalhealthcheckv2
extension) are not included in the status output, as these are internal implementation details that should not surface to users.Key changes:
handleOtelStatusUpdate
to remove known agent-managed extensions (beatsauth/*
,elastic_diagnostics
, and agent-injectedhealthcheckv2
) from the status tree.reportSubprocessCollectorStatus()
which safely clones and publishes collector status.cloneCollectorStatus
) to prevent mutation races on shared status references between the collector and reporting goroutines.Why is it important?
Previously, all OTel extensions - including agent internal ones - were always visible in
elastic-agent status
output.This caused confusion and clutter in the status tree, exposing implementation details irrelevant to users.
By filtering out agent-managed extensions and cloning the status tree before reporting, this change ensures cleaner, more user-focused status output.
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
Since a release with otel runtime enabled by default is not yet published there is no disruptive user impact
How to test this PR locally
Related issues
N/A
This is an automatic backport of pull request #10412 done by Mergify.