-
Notifications
You must be signed in to change notification settings - Fork 543
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
Return and log detailed services information on /ready #2055
Conversation
This helps debug starting services more easily. Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
} | ||
|
||
http.Error(w, msg.String(), http.StatusServiceUnavailable) | ||
strMsg := msg.String() | ||
level.Debug(util_log.Logger).Log(strMsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to debug-log this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My original thinking was that this should make it easier to see why components aren't ready - no need to port-forward to pods and curl endpoints - it will be in the logs.
Do you think that would be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have logs for each starting/started module, which can be used to find out which modules aren't ready.
If we change this log line to only log non-ready modules, I think it would be more useful than logging ALL modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change this log line to only log non-ready modules, I think it would be more useful than logging ALL modules.
agreed, pushed a change in d214659
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Signed-off-by: Dimitar Dimitrov dimitar.dimitrov@grafana.com
What this PR does
The
/ready
will now include each service's state when there is at least one non-Running
service (e.g.Failed
orStarting
). The same will be logged at debug level.Previously output:
Current output:
Which issue(s) this PR fixes or relates to
Fixes #1780
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]