dotnet / SqlClient

Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.
MIT License
857 stars 286 forks source link

Fix AdvancedTraceBin #2895

Closed David-Engel closed 3 weeks ago

David-Engel commented 1 month ago

Prior to these changes, AdvancedTraceBin would output messages that looked like: "TdsParser.ReadNetworkPacketAsyncCallback | INFO | ADV | State Object Id 1, Packet read. In Buffer System.Byte[], In Bytes Read: System.Byte[]"

Note the System.Byte[].

After these changes, AdvanceTraceBin will actually output the buffer data (without <clipped>): "TdsParser.ReadNetworkPacketAsyncCallback | INFO | ADV | State Object Id 1, Packet read. In Buffer: 0401003600000100000024000601002A00<clipped>, In Bytes Read: 54"

You will also be able to specifically include/exclude AdvanceTraceBin data. It was previous gated incorrectly on the AdvancedTrace keyword.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.03%. Comparing base (6064d02) to head (79ba8f7). Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
...c/Microsoft/Data/SqlClient/SqlClientEventSource.cs 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2895 +/- ## ========================================== - Coverage 72.03% 72.03% -0.01% ========================================== Files 299 300 +1 Lines 61464 61543 +79 ========================================== + Hits 44277 44332 +55 - Misses 17187 17211 +24 ``` | [Flag](https://app.codecov.io/gh/dotnet/SqlClient/pull/2895/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [addons](https://app.codecov.io/gh/dotnet/SqlClient/pull/2895/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `92.90% <ø> (ø)` | | | [netcore](https://app.codecov.io/gh/dotnet/SqlClient/pull/2895/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `75.93% <87.50%> (-0.02%)` | :arrow_down: | | [netfx](https://app.codecov.io/gh/dotnet/SqlClient/pull/2895/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `70.27% <88.88%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.