Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
benrr101 merged 3 commits intodotnet:mainfromedwardneal:merge/xevents-tracing
May 29, 2025

Conversation

edwardneal
Copy link
Contributor

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 theattach_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.

ErikEJ and David-Engel reacted with hooray emoji
@edwardnealedwardneal requested a review froma team as acode ownerMay 23, 2025 21:48
@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

paulmedynski
paulmedynski previously approved these changesMay 26, 2025
Also add comment to TdsParser referencing MS-TDS specification
@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@codecovCodecov
Copy link

codecovbot commentedMay 26, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is70.00000% with3 lines in your changes missing coverage. Please review.

Project coverage is 62.30%. Comparing base(b8948f2) to head(9bdf134).
Report is 10 commits behind head on main.

Files with missing linesPatch %Lines
.../netcore/src/Microsoft/Data/SqlClient/TdsParser.cs66.66%2 Missing⚠️
...nt/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs75.00%1 Missing⚠️
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
FlagCoverage Δ
addons?
netcore66.69% <66.66%> (-5.51%)⬇️
netfx60.92% <75.00%> (-4.27%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cheenamalhotracheenamalhotra requested a review froma teamMay 27, 2025 17:26
@cheenamalhotracheenamalhotra added this to the6.1-preview2 milestoneMay 27, 2025
Copy link
Contributor

@benrr101benrr101 left a 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 !!

edwardneal reacted with hooray emoji
@benrr101benrr101 merged commitb68f44a intodotnet:mainMay 29, 2025
237 checks passed
@edwardnealedwardneal deleted the merge/xevents-tracing branchMay 29, 2025 19:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@benrr101benrr101benrr101 approved these changes

@paulmedynskipaulmedynskipaulmedynski approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
6.1-preview2
Development

Successfully merging this pull request may close these issues.

4 participants
@edwardneal@paulmedynski@benrr101@cheenamalhotra

[8]ページ先頭

©2009-2025 Movatter.jp