-
Notifications
You must be signed in to change notification settings - Fork 852
SqlClient Instrumentation to leverage native Activity Status. #3751
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
Changes from 3 commits
e013e0f
c05cca5
3bbd827
77768cb
db64a2f
df963a7
6474e65
e57006b
55386f7
8780039
9021b98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,16 +183,16 @@ private void OnEndExecute(EventWrittenEventArgs eventData) | |
| int compositeState = (int)eventData.Payload[1]; | ||
| if ((compositeState & 0b001) == 0b001) | ||
| { | ||
| activity.SetStatus(Status.Unset); | ||
| activity.SetStatus(ActivityStatusCode.Unset); | ||
|
||
| } | ||
| else if ((compositeState & 0b010) == 0b010) | ||
| { | ||
| var errorText = $"SqlExceptionNumber {eventData.Payload[2]} thrown."; | ||
| activity.SetStatus(Status.Error.WithDescription(errorText)); | ||
| activity.SetStatus(ActivityStatusCode.Error, errorText); | ||
| } | ||
| else | ||
| { | ||
| activity.SetStatus(Status.Error.WithDescription("Unknown Sql failure.")); | ||
| activity.SetStatus(ActivityStatusCode.Error, "Unknown Sql failure."); | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.