-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
can we record more information about slow_sql log #6898
Comments
That is a good suggestion, we'll take it into consideration. @kitdine |
appname能记录吗 |
No. |
@liuqian1990 In pratice, you can add appName or appId or traceid in sql as a sql comment, e.g.
and you can union encapsulate this attach action in your data access layer or framework then you can see it in db log. |
@lysu so which tidb version has this feature,I do not find it on the 2.0.3 version |
@kitdine Sorry, let me see... it's in master and doesn't pick to 2.0.x now.. |
@lysu ok so when can we have a version that include this feature? |
for current, you can use master code for test, and we will port this feature to 2.0.5 |
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
Now, in the slow_sql log file we just can see happening time, type,succ,connectionId,costTime,database,sql
What did you expect to see?
can we record the execute user and request ip address
What did you see instead?
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?Release Version: v2.0.3-1-g98c480c
Git Commit Hash: 98c480c
Git Commit Branch: release-2.0
UTC Build Time: 2018-06-03 03:09:10
GoVersion: go version go1.10.2 linux/amd64
TiKV Min Version: 2.0.0-rc.4.1
The text was updated successfully, but these errors were encountered: