-
Notifications
You must be signed in to change notification settings - Fork 195
[8.19] (backport #10158) Improve logging to catch early errors on startup #10249
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
base: 8.19
Are you sure you want to change the base?
Conversation
* Update run command to have a critical section to ensure errors are always logged. * Add changelog. * Cleanup from code review. (cherry picked from commit 18beeba) # Conflicts: # internal/pkg/agent/cmd/run.go
Cherry-pick of 18beeba 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 @blakerouse? 🙏 |
What does this PR do?
Updates the
run
subcommand to always log any errors to the logger.Why is it important?
There where still some cases where the Elastic Agent can fail to run but the reason is not written to the log.
Checklist
[ ] 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./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
None.
Related issues
This is an automatic backport of pull request #10158 done by [Mergify](https://mergify.com).