-
Notifications
You must be signed in to change notification settings - Fork 333
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
log db statement with parameter value when use SmartSql #539
Conversation
@@ -249,7 +250,12 @@ public void BeforeCommandExecuterExecute([Object]CommandExecuterExecuteBeforeEve | |||
var context = CreateSmartSqlLocalSegmentContext(eventData.Operation); | |||
if (eventData.ExecutionContext.Request.RealSql != null) | |||
{ | |||
context.Span.AddTag(Common.Tags.DB_STATEMENT, eventData.ExecutionContext.Request.RealSql); | |||
//context.Span.AddTag(Common.Tags.DB_STATEMENT, eventData.ExecutionContext.Request.RealSql); |
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.
Why do you comment this line?
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.
Below varialbe "sql" include "RealSql"
for example:
ReqlSql="select 1 from T where F1=@F1"
sql="selece 1 from T where F1='aaa'"
So it's no need to log RealSql
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.
I mean if you try to delete this, delete this. Git is the time machine. We don't need to keep old codes.
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.
Recommit pr after I delete it?
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.
Yes, if your plan is to remove this line.
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.
done!
Let's wait for @liuhaoyang to review other details. |
LGTM |
Please answer these questions before submitting pull request
Why submit this pull request?
New feature provided
Related issues
Can't log parameter values
New feature or improvement