-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add a new system variable tidb_session_alias
to print some custom trace info in log
#46071
Closed
8 tasks done
Labels
Comments
Merged
12 tasks
This was referenced Aug 23, 2023
This was referenced Aug 30, 2023
This was referenced Sep 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Add a new system variable
tidb_session_alias
to print some custom trace info in log. After setting this var by:The log entries in the session will include a
session_alias
field:Classifying logs with some custom dimensions (connection, statement, or business) will be helpful. The value of
@@tidb_session_alias
should also be propagated across nodes such as TiKV. For the above example, if the TiKV coprocessor execution is slow, a log withsession_alias
field will be logged like:connection id and session alias entry should be added to some kind of logs:
tidb_session_alias
to log a custom fieldsession_alias
in session log #46072CoprocessorDAGHandler
should include tracing fields #46505conn
andsession_alias
entry in ddl worker log #46441session_alias
field in audit logs #46502SESSION_ALIAS
column in processlist table and expensive query log #46889tidb_session_alias
when it is not a valid value #46707The text was updated successfully, but these errors were encountered: