Skip to content

Cleanup | SqlDiagnosticListener Classes #3232

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

Merged
merged 3 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Some more heavy cleanup on SqlDiagnosticListener
  • Loading branch information
benrr101 committed Mar 19, 2025
commit cecc3300de75f24ad34e528bed68f67f2f6dfe3c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected override void AfterCleared(SqlCommand owner)
private static bool _forceRetryableEnclaveQueryExecutionExceptionDuringGenerateEnclavePackage = false;
#endif

private static readonly SqlDiagnosticListener s_diagnosticListener = new SqlDiagnosticListener(SqlDiagnosticListener.DiagnosticListenerName);
private static readonly SqlDiagnosticListener s_diagnosticListener = new SqlDiagnosticListener();
private bool _parentOperationStarted = false;

internal static readonly Action<object> s_cancelIgnoreFailure = CancelIgnoreFailureCallback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private enum CultureCheckState : uint
private SqlRetryLogicBaseProvider _retryLogicProvider;

// diagnostics listener
private static readonly SqlDiagnosticListener s_diagnosticListener = new SqlDiagnosticListener(SqlDiagnosticListener.DiagnosticListenerName);
private static readonly SqlDiagnosticListener s_diagnosticListener = new SqlDiagnosticListener();

// Transient Fault handling flag. This is needed to convey to the downstream mechanism of connection establishment, if Transient Fault handling should be used or not
// The downstream handling of Connection open is the same for idle connection resiliency. Currently we want to apply transient fault handling only to the connections opened
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.Data.SqlClient
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/SqlTransaction/*' />
public sealed partial class SqlTransaction : DbTransaction
{
private static readonly SqlDiagnosticListener s_diagnosticListener = new(SqlDiagnosticListener.DiagnosticListenerName);
private static readonly SqlDiagnosticListener s_diagnosticListener = new();

////////////////////////////////////////////////////////////////////////////////////////
// PUBLIC METHODS
Expand Down
Loading
Loading