public static void WriteTransactionCommitError(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, Exception ex, [CallerMemberName] string operation = "") { if (@this.IsEnabled(SqlErrorCommitTransaction)) { @this.Write( SqlErrorCommitTransaction, new { OperationId = operationId, Operation = operation, IsolationLevel = isolationLevel, Connection = connection, Exception = ex, Timestamp = Stopwatch.GetTimestamp() }); } }