-
Notifications
You must be signed in to change notification settings - Fork 289
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
Fix activity correlator to continue using same GUID for connection activity #1997
Fix activity correlator to continue using same GUID for connection activity #1997
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1997 +/- ##
==========================================
- Coverage 70.83% 69.84% -0.99%
==========================================
Files 306 306
Lines 61725 61722 -3
==========================================
- Hits 43725 43112 -613
- Misses 18000 18610 +610
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 25 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ActivityCorrelator.cs
Show resolved
Hide resolved
/azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
…ame GUID for current thread activity (dotnet#1997) Ports [dotnet#1997](dotnet#1997)
…ame GUID for current thread activity (dotnet#1997) Ports [dotnet#1997](dotnet#1997)
…ame GUID for current thread activity (dotnet#1997) Ports [dotnet#1997](dotnet#1997)
I learnt about this issue internally that Activity Id Correlation was not working properly, and Activity Id GUID was not being reused when connecting to Azure SQL with 'redirection', as that is expected for the same connection activity.
Activity Id should be retained for the physical connection as is also the case with the ODBC driver with sequence increments.
Below code can be used to test the bug and verify the fix:
When looking into traces, notice the activity Id associated with
<sc.TdsParser.SendPreLoginHandshake|INFO>
event.Capturing activity Id correlated with connection activity is helpful for troubleshooting purposes.