You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the WriteCommandBefore and WriteCommandAfter DiagnosticSource events defined in this file it doesn't seem like there's a way to associate commands with the transactions they were a part of. In the WriteCommand events you're able to tell if the command was part of a transaction based on the Transaction property of the SQLCommand being not null, however it doesn't seem like there's a way to tell which transaction the command was a part of since the transaction object itself doesn't have any public properties to help identify it from other transactions using the same connection. As a result you can't tell which commands were grouped together in which transaction, you can only tell if a command was part of a transaction at all. Would it be possible to add a property to the transaction object itself or to one of the WriteCommand DiagnosticSource events so that you can associate which commands were part of the same transaction together?
It would also be ideal if there was a way to associate the WriteCommand events with the WriteTransaction events for the queries that are part of a transaction, however I'd be happy with just being able to tell which commands are part of the same transaction.
The text was updated successfully, but these errors were encountered:
We're currently working on improving overall tracing experience in SqlClient (see issue dotnet/SqlClient#93), I will move your request to the same issue instead, so we'll remember to address this as well.
When using the
WriteCommandBefore
andWriteCommandAfter
DiagnosticSource events defined in this file it doesn't seem like there's a way to associate commands with the transactions they were a part of. In theWriteCommand
events you're able to tell if the command was part of a transaction based on theTransaction
property of theSQLCommand
being not null, however it doesn't seem like there's a way to tell which transaction the command was a part of since the transaction object itself doesn't have any public properties to help identify it from other transactions using the same connection. As a result you can't tell which commands were grouped together in which transaction, you can only tell if a command was part of a transaction at all. Would it be possible to add a property to the transaction object itself or to one of theWriteCommand
DiagnosticSource events so that you can associate which commands were part of the same transaction together?It would also be ideal if there was a way to associate the
WriteCommand
events with theWriteTransaction
events for the queries that are part of a transaction, however I'd be happy with just being able to tell which commands are part of the same transaction.The text was updated successfully, but these errors were encountered: