-
Notifications
You must be signed in to change notification settings - Fork 500
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
How to view TiDB slow log? #231
Comments
We could write our own Admission Controller plugin to inject the log sidecar just like what Istio does |
Thanks for your suggestion, we'll investigate this approach. |
@mlycore Since the TiDB pods are created by TiDB StatefulSet, and the StatefulSet is created by TidbCluster, we can totally control how our pods look like. So there is no need to add another plugin to inject log sidecar. |
I'd like to help with this issue if there is no ongoing development work. |
@aylei Of course you can, thank you. Feel free to contact us if you have any problems. |
* en: fix a title in toc * align doc titles with toc titles Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com> Co-authored-by: Lilian Lee <lilin@pingcap.com>
TiDB can output slow log to a separate log file. This makes it easy to view the slow logs. Otherwise, users have to grep slow log from all logs. However, users cannot view the slow logs by
kubectl
if TiDB pod emits logs to a separate log file.Kubernetes documentation suggests using sidecar to support multiple log files. The sidecar container can only tails the log file to stdout, so the resources used is small:
So I think we should add sidecar container for TiDB pod for slow log.
The text was updated successfully, but these errors were encountered: