-
Notifications
You must be signed in to change notification settings - Fork 122
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
Improve Upgrade-related logging #3382
Conversation
This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
NOTE: |
This pull request is now in conflicts. Could you fix it? 🙏
|
138fa16
to
7744a14
Compare
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
c8c8dbc
to
71d53b4
Compare
🌐 Coverage report
|
buildkite test this |
Force merging to get past the sonarqube gate, we don't need unit test coverage for log level changes. |
* Log all upgrade-related messages at INFO level * Print Agent PID and version at startup * Print Upgrade Watcher PID and Agent version at startup * Use ECS keys * Log invoked upgrade watcher PID along with invoking Agent PID * Add CHANGELOG entry * Revert to DEBUG level logging on file extractions * Removing redundant log line * Running mage fmt (cherry picked from commit 66fa5a7) # Conflicts: # internal/pkg/agent/application/upgrade/crash_checker.go
* Improve Upgrade-related logging (#3382) * Log all upgrade-related messages at INFO level * Print Agent PID and version at startup * Print Upgrade Watcher PID and Agent version at startup * Use ECS keys * Log invoked upgrade watcher PID along with invoking Agent PID * Add CHANGELOG entry * Revert to DEBUG level logging on file extractions * Removing redundant log line * Running mage fmt (cherry picked from commit 66fa5a7) # Conflicts: # internal/pkg/agent/application/upgrade/crash_checker.go * Resolve conflict --------- Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
What does this PR do?
This PR makes several improvements to logs emitted by the Agent upgrade process:
INFO
level is unhelpefully verbose.Why is it important?
To increase visibility into the Agent upgrade process, so we can tell from logs exactly where and how upgrades might have failed.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature works./changelog/fragments
using the changelog toolI have added an integration test or an E2E testHow to test this PR locally
Since this PR makes changes to the upgrade code in the coordinator's execution path, which is executed by the pre-upgrade Agent binary, as well as upgrade watcher code, which is executed by the post-upgrade Agent binary, two separate tests are necessary.
Testing the changes in the upgrade code in the coordinator's execution path
Testing the changes in the upgrade watcher code
Related issues