dotnet / dotnet/SqlClient

Add Exception Summarization for Microsoft.Data.SqlClient Exceptions

Open
#2,461 1 comment 1 reaction 0 assignees View on GitHub
Up-for-Grabs :raised_hands:
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 19h
Merged PRs (30d)
72

Description

### Is your feature request related to a problem? Please describe.
Loosely related to #649 and #2342 as these are also about surfacing information about exceptions and the hope is that the result of IsTransient and the ErrorNumber properties would be able to give additional context in a SQL Server specific `IExceptionSummaryProvider` implementation.

### Describe the solution you'd like
[Exception summarization](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/diagnostic-exception-summary) is a new feature of .NET 8. All examples of Exception summarization are configured with `.AddExceptionSummarizer(static builder => builder.AddHttpProvider())`, but when I see this, I instantly think of needing a `.AddExceptionSummarizer(static builder => builder.AddSqlServerProvider())` that would include information like ErrorNumber, if the error is believed to be transient, along with the usual exception summarization.

### Describe alternatives you've considered
* Each project writes their own `IExceptionSummaryProvider` implementation
* A Microsoft.Data.SqlClient.ExceptionSummarization open-source project is started

### Additional context
Likely Microsoft.Data.SqlClient will not want to take a dependency on Microsoft.Extensions.Diagnostics.ExceptionSummarization to be able to implement the IExceptionSummaryProvider interface. This would pretty much require a separate Microsoft.Data.SqlClient.ExceptionSummarization NuGet package to be created, right?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.