-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Elastic Agent] Improve error logging (reduce to Info Level where possible) wrt changing logging level to debug #154
Comments
Pinging @elastic/agent (Team:Agent) |
Maybe helpful, I found one more error in the logs in the Fleet UI:
|
Hi @EricDavisX While performing testing, we have observed above mentioned errors occurring on 7.13 Bc3 cloud qa build on changing agent logging level. Screenshot1: Further, Issue 25385 is also occurring on kibana UI. Logs start to generate as per changed logging level however not updated on agent details or logs page. Please let us know if anything else is required. Thanks |
i think this is expected, we change log level by reexecing and stopping all components. so context cancelled may be a byproduct of this workflow. log level is not a reloadable value |
If it is expected, should it be logged as error? And can we improve the log message? |
what we discussed offline: this is expected from a point of view we log that context is cancelled and something is happening. |
I'd consider the log line itself as a minor improvement - is there any discussion on why the log level in the UI wasn't updated (or wasn't updated quickly enough to be dismissed) ? I don't know how long we should wait before considering it a bug - thoughts from the technical perspective? |
@EricDavisX We didn't have any conversations around this but it is definitively worth discussing. @michalpristas Is the log level change also a new revision of the policy so it could be seen in the policy rollout overview? I assume not as it is specific per Agent. How can we let users know that it is rolled out? @EricDavisX I think we need to open an issue for this in Kibana to get the UX in place. |
Sounds good @ruflin. I logged this for the separate Kibana work: elastic/kibana#99788 This issue is more severe and will remain open for the fact that sometimes the log level just isn't updated: |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
As seen with @ph reducing the scope of this issue to rework only the status loop mentioned here: |
@ph the status log is coming from this file: I do not see any issues there. Is it possible that Kibana UI "fails" to parse our logs and retrieve all logs without taking care of the specified level? |
This code improve the error reporting when Elastic Agent is stopped through the pass context. This move the state reporting closer to the execution of the request. Error related to the request would still be logged as error and will change the internal state to non healthy. Fixes: elastic#154
* Move the `context cancelled` error message into a debug statement This code improve the error reporting when Elastic Agent is stopped through the pass context. This move the state reporting closer to the execution of the request. Error related to the request would still be logged as error and will change the internal state to non healthy. Fixes: #154
The Elastic Agent was running for a few minutes and I changed the logging level in the Fleet UI from
Info
toDebug
. This all seems to have worked but the first we lines that were logged, looked as following:I stumbled over the two
ERROR
log entries related to context which also contain very little "context" what it is about.The text was updated successfully, but these errors were encountered: