Skip to content

Unable to listen to events from System.Data.SqlClient and Microsoft.Data.SqlClient via EventListener in one application #436

@vhatsura

Description

@vhatsura

Is your feature request related to a problem? Please describe.

At the moment, it's impossible to listen to events from System.Data.SqlClient and Microsoft.Data.SqlClient via EventListener in one .Net Framework application due to event sources for both libraries have the similar name Microsoft-AdoNet-SystemData. As a result, GUIDs associated with event sources also are similar and the following error has occurred:

Exception in Command Processing for EventSource Microsoft-AdoNet-SystemData:
An instance of EventSource with Guid 6a4dfe53-eb50-5332-8473-7b7e10a94fd1 already exists.

Describe the solution you'd like

Have a different event source name like it was done for diagnostic sources, however, it looks like a breaking change. Maybe it's a candidate to change it in 2.0.0 version

Describe alternatives you've considered

I don't see any alternatives right now.

Additional context

To be honest, I don't think it is often a scenario to have both SQL clients in user code. The only possible scenario is for the code migration period.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions