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

Dependency Tracking for Always Encrypted Connection in ASP.NET Core 2.2 #1482

Closed
lsuarez5280 opened this issue Dec 5, 2019 · 4 comments
Closed

Comments

@lsuarez5280
Copy link

lsuarez5280 commented Dec 5, 2019

Hello. I wish I had more specifics around the limitations here, but I've had to transition to the Microsoft.Data.SqlClient package in order to support Always Encrypted with my ASP.NET Core 2.2 application. This has the unfortunate effect of eliminating automatic wireup of SQL dependency tracking. I admit I don't fully know what events Application Insights hooks in order to facilitate SQL dependency tracking in Core, so I'm at a loss as to how to restore this to my impacted applications that have had to replace their SqlConnection factory and ISqlConnection implementation for Entity Framework Core 2. Could someone potentially point me to any place they might know of that I can reattach dependency tracking to this SqlClient, or at least how this is done in the current codebase so I can try to replicate functionality?

Currently using the Microsoft.ApplicationInsights.AspNetCore 2.8.2 package.

@lmolkova
Copy link
Member

lmolkova commented Dec 5, 2019

Please start with https://github.com/dotnet/SqlClient. They should be able to share any behavior in DiagnosticSource hooks that is affected by Always Encrypted mode.

This is the code AppInsights is hooked to: https://github.com/dotnet/SqlClient/blob/654933a0811ab30b843a20aff051b8d585238505/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs

@lsuarez5280
Copy link
Author

Thanks @lmolkova. I appreciate the pointers and will post back if I have further inquiries, along with a solution if I have one.

@lsuarez5280
Copy link
Author

Leaving a trackback to dotnet/SqlClient#93 since it's related to this question.

@lsuarez5280
Copy link
Author

@lmolkova Actually after reviewing SqlClientDiagnosticSourceListener.cs on the latest beta release, this library appears to be supported, so please disregard this issue. I'll close for now and reopen if it's not what I anticipated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants