-
Notifications
You must be signed in to change notification settings - Fork 5k
Give unique event ID to TRANSACTION_CREATED_OLETX_EVENTID #109138
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
Conversation
TransactionsEtwProvider incorrectly allocated the same event Id (11) to METHOD_ENTER_LTM_EVENTID and TRANSACTION_CREATED_OLETX_EVENTID events. Event Listeners are unable to subscribe to this EventSource when there are events with the same ID. I suspect it is acceptable for two methods to send events for the same ID, but they'll have different payloads. I don't know if there's any thing that can be done to resolve that for existing versions, but no one would have been able to listen to these events, so perhaps that's less of a problem. I chose to change the second event because it looks like it should have been 51 by the order of other events around it.
Tagging subscribers to this area: @roji, @ajcvickers |
#109101 (fixed link) |
Should be a reference to #109101. |
No, from my observations, when an EventListener calls EnableEvents on this EventSource it fails because the EventSource has two events with the same ID. So there can't be any EventListeners. You can see the failure details in #109101 (sorry I missed the last number when I posted the link earlier) |
Does .NET Framework output these ETW events? If so, there might be software that consumes them, even though .NET Core has not been able to output them. |
No. The .NET Framework version of Transactions doesn't use ETW and doesn't use numbers for event IDs. See https://referencesource.microsoft.com/#System.Transactions/System/Transactions/Trace/TraceRecords.cs,6cee693cd59558e9 Can anything technically listen to this event source if it has two events with the same key (we know EventListener-based classes can't)? |
ETW and EventPipe cannot listen. Those would go through EventSource.WriteEventWithRelatedActivityIdCore, which needs m_eventData, which would be initialized in CreateManifestAndDescriptors, but the exception "Event MethodEnterTraceLtm has ID 11 which is already in use." is thrown first and causes the initialization to be skipped. |
Hi, how do I get this to progress - it has been sitting ready for review for three weeks? |
I've been struggling to debug some issues I have with TransactionScopes not completing, and came across this issue preventing me from listening to the transaction events. Is there any chance of this being merged soon? |
How do you go about getting this merged in? This is causing problems as it prevents all EventListeners from working if this EventSource is present. |
This change is logical and clear. Sorry for the delay getting it merged; thank you for the contribution @Camios. |
@jeffhandley thank you for advancing this! It was my first contribution. Where can I track this change to a future dotnet release? |
@Camios this has been merged for the upcoming .NET 10 release. |
TransactionsEtwProvider incorrectly allocated the same event Id (11) to METHOD_ENTER_LTM_EVENTID and TRANSACTION_CREATED_OLETX_EVENTID events. Event Listeners are unable to subscribe to this EventSource when there are events with the same ID.
I suspect it is acceptable for two methods to send events for the same ID, but they'll have different payloads. I don't know if there's any thing that can be done to resolve that for existing versions, but no one would have been able to listen to these events, so perhaps that's less of a problem. I chose to change the second event because it looks like it should have been 51 by the order of other events around it.