Skip to content
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

[core] Log about individual status changes that occur after startup #116718

Closed
spalger opened this issue Oct 28, 2021 · 3 comments · Fixed by #126320
Closed

[core] Log about individual status changes that occur after startup #116718

spalger opened this issue Oct 28, 2021 · 3 comments · Fixed by #126320
Assignees
Labels
enhancement New value added to drive a business result impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@spalger
Copy link
Contributor

spalger commented Oct 28, 2021

We just spent a ton of time tracking down a plugin which was updating it's status from degraded to available very slowly. The vast majority of the time was spent just trying to understand how statuses were changing and would have been pretty trivial if we had seen a log line like:

Status of plugin "alerting" is now available (was degraded for 5 minutes)

I think it would be very useful to log these types of messages at an info level when they occur after some initial delay (to avoid a massive flood of messages about status changes as things startup).

@spalger spalger added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc enhancement New value added to drive a business result labels Oct 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Oct 29, 2021
@pgayvallet
Copy link
Contributor

I agree that having status changes of individual services/plugins logged could make sense, and would probably help for support too.

I'm still a little concerned about the potential verbosity of the thing. As most plugins don't register custom status handlers, their status is computed depending on the statuses of their dependencies.

In practice, that can lead to a lot of consecutive status changes. For example, if the home (data is another example) plugins changes from available to degraded, this will cause most of the plugins to get to the same state, as almost every plugin's dependency tree has either of those somewhere at the bottom of the tree, causing ~= 100 lines outputted.

We could potentially try to group these status changes by trying to identify the 'root' plugin/service that caused the change in the tree (something like 34 plugins changed from available to degraded due to a change of status coming from 'alerting'), but to be honest, this may not be easy, given the observable hell the status plugin currently is.

So, are we fine just outputting a line in the log for each individual status change, even if in most scenario, we'll have dozen of such lines in every status change batch, or do we want more than that?

@spalger
Copy link
Contributor Author

spalger commented Dec 6, 2021

I think individual log lines for any delayed status update (one that doesn't happening "immediately" after creation or something) sounds reasonable. They're all useful information that we should be making people aware of I think.

@pgayvallet pgayvallet self-assigned this Feb 23, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 15, 2022
gsoldevila added a commit that referenced this issue Oct 25, 2023
## Summary

New attempt at fixing #116718
Inspired on #126320

Here's what the newly logged `[status]` information looks like on a
fresh startup:
<img width="1834" alt="image"
src="https://github.com/elastic/kibana/assets/25349407/d78d7f88-139f-4daf-9dc0-c4e6724ea412">

The first 2 entries are logs from Core services 🆕 .
The next 5 entries are emitted due to `taskManager` plugin emitting a
degraded status right at startup.
I have created an issue to tackle that one:
#168237

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants