Fix agent becoming unhealthy when log level is changed to warning#12519
Merged
cmacknz merged 7 commits intoelastic:mainfrom Feb 2, 2026
Merged
Fix agent becoming unhealthy when log level is changed to warning#12519cmacknz merged 7 commits intoelastic:mainfrom
cmacknz merged 7 commits intoelastic:mainfrom
Conversation
Contributor
|
This pull request does not have a backport label. Could you fix it @cmacknz? 🙏
|
Contributor
238b906 to
17e4d6e
Compare
Contributor
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
cmacknz
commented
Feb 2, 2026
swiatekm
approved these changes
Feb 2, 2026
Contributor
swiatekm
left a comment
There was a problem hiding this comment.
LGTM. I agree the naming is unfortunate. Imo it should go like so:
logLevel->collectorLogLevelbaseLogger->collectorLoggerlogger->managerLogger
Member
Author
|
Thanks! I should be able to do a follow up improving the names. |
mergify bot
pushed a commit
that referenced
this pull request
Feb 2, 2026
…2519) * Handle a nil monitoring config getter * Use correct logger during translation * Add test case to reproduce the problem * Switch from string to logp.Level in subprocess execution. * Add test for log level translation. * Fixes after self-review. * Add changelog. (cherry picked from commit 94a26a4)
cmacknz
added a commit
that referenced
this pull request
Feb 2, 2026
…2519) (#12557) * Handle a nil monitoring config getter * Use correct logger during translation * Add test case to reproduce the problem * Switch from string to logp.Level in subprocess execution. * Add test for log level translation. * Fixes after self-review. * Add changelog. (cherry picked from commit 94a26a4) Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
Member
Author
|
#12559 to rename the loggers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes agent becoming unhealthy when using the warning log level, which happens only for this level as it's the only one where a case insensitive conversion from a collector log level fails ("WARN" vs "warning").
Refactors the OTel manager to represent the log level as a logp level instead of an untyped string and allow unit testing the log level resolution logic after a configuration change.