-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
查询超时也要记录日志 #2110
查询超时也要记录日志 #2110
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2110 +/- ##
==========================================
- Coverage 75.24% 75.24% -0.01%
==========================================
Files 105 105
Lines 15182 15183 +1
==========================================
Hits 11424 11424
- Misses 3758 3759 +1
☔ View full report in Codecov by Sentry. |
hit_rule=query_result.mask_rule_hit, | ||
masking=query_result.is_masked, | ||
) | ||
query_log.save() |
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.
你好, 要不放进 finally 里面吧, 这样即使查询异常也有查询记录
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.
你好,我觉得暂时没有必要记录查询异常情况,可以把查询过程中超时或者被kill处理,出现查询错误等情况记录下即可
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.
调整后这个记录的位置已经是记录了异常情况,比如语法错误等
以前是query_result.error不存在才记录
var extraInfo = tabs[i].children[1].innerHTML+"|"+e.length; | ||
var instance_name = $("#instance_name").val() | ||
var db_name =$("#db_name").val() | ||
var extraInfo = instance_name+"/"+db_name+"|"+$(tabs[i].children[1]).attr('sql_cache')+"|"+e.length; |
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 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.
当前版本中记录下载的审计日志,获取sql语句是空的,只记录了下载的行数,具体是哪个sql的下载是不知道的
查询超时也要记录日志