- Notifications
You must be signed in to change notification settings - Fork311
Merge | Port XEvents activity ID correlation to .NET Core#3373
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Also add comment to TdsParser referencing MS-TDS specification
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
codecovbot commentedMay 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3373 +/- ##==========================================- Coverage 67.04% 62.30% -4.75%========================================== Files 300 292 -8 Lines 65376 65229 -147 ==========================================- Hits 43831 40639 -3192- Misses 21545 24590 +3045
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
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.
Overall, great changes, I appreciate your efforts on these,@edwardneal !!
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
b68f44a
intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
Description
If tracing was enabled, the netfx version of SqlClient would send the current activity ID to the remote database server. This functionality was part of TdsParser and would be covered by the merge, but it lacked test coverage. I've ported the feature to netcore and added a test.
As a result, it's now possible to enable tracing, then link the activity ID of a SqlCommand to the
attach_activity_id_xfer
value of the appropriate server-side XEvent. The XEvents can then be correlated further within SQL Server. We gain end-to-end trace correlation. In the future, this could be used to link OpenTelemetry spans into SQL Server XEvents.A fuller description of the feature (albeit one which is described in terms of SQL Server Native Client) is documentedhere.
Issues
Relates to#1261.
Testing
Added one new functional test. This test enables tracing and XEvents, then runs a simple query or stored procedure and compares the activity ID recorded by the XEvents trace to the activity ID recorded in the SqlClient tracing.