Skip to content
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

Visual Studio Diagnostic Tools Events missing in Microsoft.Data.SqlClient #2634

Closed
Banner-Keith opened this issue Jun 28, 2024 · 6 comments
Closed
Labels
🔗 External Issue is in an external component

Comments

@Banner-Keith
Copy link

Banner-Keith commented Jun 28, 2024

We recently switched from System.Data.SqlClient to Microsoft.Data.SqlClient. One difference we've noticed that's been quite painful is that we no longer get events logged in the Visual Studio Diagnostic Tools window showing ADO.net queries.

Example:
image

It doesn't appear that there's a way to get that experience out of the box. Is there some way we can at least dump this information in the debug log when we are debugging a running app?

I searched for related issues and found this in a different issue about tracing, but it wasn't addressed there since it was really a different issue. I thought it would be worth tracking down separately.

          I'm not sure what triggers items to appear in the Diagnostic tools internally, but liked the ability that we had with .Net to see the ADO requests in there. This ability seems to have been lost in Core. Assuming adding back in proper source calls would fix this issue, I'm fine with the change. The conversation was primarily around supporting App Insights and I wanted to make sure that the Diagnostic tools weren't forgotten about.

Originally posted by @jwooley in #93 (comment)

@David-Engel David-Engel added the 🆕 Triage Needed For new issues, not triaged yet. label Jul 1, 2024
@kf-gonzalez2 kf-gonzalez2 removed the 🆕 Triage Needed For new issues, not triaged yet. label Jul 2, 2024
@arellegue
Copy link
Contributor

This issue is a duplicate of issue #93.

However, you may want to consider SqlClient's EventSource implementation.

https://learn.microsoft.com/en-us/sql/connect/ado-net/enable-eventsource-tracing?view=sql-server-ver16

@Banner-Keith
Copy link
Author

@arellegue I don't really think this is a duplicate. They are the same root cause but #93 never addressed the Visual Studio side of this issue. Only really App Insights. For a developer debugging in real-time the events showing up in the Diagnostic Tools was a huge time saver.

I will look at Event Source.

@JRahnama
Copy link
Contributor

@Banner-Keith I have reached out to the Visual Studio team internally to get some guidance on this issue and its potential fix. I will update this thread when I have an answer for you.

@Banner-Keith
Copy link
Author

@JRahnama thank you for that. I really appreciate it.

@JRahnama JRahnama added the 🔗 External Issue is in an external component label Jul 19, 2024
@JRahnama
Copy link
Contributor

@Banner-Keith this issue is external to SqlClient. Can you open a ticket at Developer Community(visualstudio.com) and follow there? Seems like the action needs to be taken from their side to include M.D.SqlClient in their product.

@JRahnama
Copy link
Contributor

Closing the issue as it is external to SqlClient. Feel free to comment here or open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔗 External Issue is in an external component
Projects
Development

No branches or pull requests

5 participants