-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add instrumentation for Microsoft.Data.SqlClient for .Net Framework target #783
Comments
I've just finished integrating Elastic.Apm.SqlClient in my Asp.NET full framework project (4.7.2). I was able to piece together instructions by following the "issue" 700 and PR 784.
|
@PlymouthUniversitySolDev, I'm glad to hear that you were able to integrate As for plans, there are no plans to drop support for |
Gents, may I ask if it's possible (and if so - how exactly?) to add SqlClientDiagnosticSubscriber to Global.asax in my case. I have a 3rd party full .net framework application and no source code. Gloabl.asax contains only this line: Thanks in advance. |
Hey, @dominikskiba. As I understand correctly, you already installed if (Agent.IsConfigured) Agent.Subscribe(new SqlClientDiagnosticSubscriber()); As for place, where you need to put it. Yeap, it can be I hope, it will help you in your case |
To follow up on @vhatsura's comment: You can download the NuGet package from our CI - that's what you need to add to your app. Also, since you say in your Also (I know this won't help now but...) the mid-term plan is to have another IIS module that not only captures the Web Request but also turns on all other components including DB capturing. #336 is about that. So the idea is that you'll reference another package which you turn on the same way as you turned on |
Thank you @vhatsura and @gregkalapos. The trick here is I only see Dominik |
@dominikskiba if you don't find any way to run code in the app, then probably the only way would be to wait until #336 is done. |
@vhatsura - were you guys able to make progress on this one, we have recently added APM to our .net full framework asp net website and would be interested in getting command text also logged, which i believe is possible with use of Microsoft.Data.SQLClient packages.But given APM Agent for full framework dont currently support it, no point of me changing to it. Can we look forward to it being there in a near future release? |
|
Support for common SqlClient providers has been implemented as part of profiler auto instrumentation in #1534. This includes capturing command text on all target frameworks that the agent supports. Profiler auto instrumentation is scheduled to be released as beta in the next release, 1.12. |
During implementation auto instrumentation for
System.Data.SqlClient
it was decided to skip it forMicrosoft.Data.SqlClient
due to issue which is described in a comment at #704 (comment).Shortly, the issue is in the same event source names for
System.Data.SqlClient
andMicrosoft.Data.SqlClient
. It was changed in dotnet/SqlClient#399 and the event source name forMicrosoft.Data.SqlClient
can be found at https://github.com/JRahnama/SqlClient/blob/27f3bba874d55ef3d6670b945cc584e7cd2de69c/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEventSource.cs#L11. The fix is going to be released in v2.0.0-preview2 and as a result will be available in 2.0.0 GA version.So, it means that we can add support of auto instrumentation for
Microsoft.Data.SqlClient
package for .Net Framework target.I open the issue with the following intention:
The text was updated successfully, but these errors were encountered: