-
Notifications
You must be signed in to change notification settings - Fork 42
what is the integration point to track ado.net queries #99
Comments
I'm looking for the same thing. I have alot of ADO code that I'd like to profile. |
At the moment we don't have this extension point built. The intention is that you shouldn't have to do anything manually here as we are working with the ado.net team to instrument it as low down as we possibly can. The end result is that it will just work and the numbers show up regardless of if you are using EF or not. |
@avanderhoorn hey man, whats the word on this? I ended up creating proxy objects with Diagnostic sources pumping stuff out, however no CommandText shown yet as its not in hud |
Currently we got an extension point put into SQL ADO.Net... Unfortunately there wasn't any real place that we could get support across all ado providers out of the box. The ado infrastructure only has abstract implementations at the level we need to tap. The end result is that we need to ping the other provider implementers and get them to implement the required diagnostic hooks. This shouldn't be too onerous on their part as Diagnostics Source makes this easy, but we just need to contact them and/or send in the PR. To date I haven't had time to do this myself. I'm hoping to do this sooner rather than later, but if you have a need for a provider outside of SQL, I'm happy to give you the info you need to do a PR and implement the Glimpse side to get it up and running. Let me know what you think. |
Sweet - do you know what the code looks like for the SQL ADO.net extension point? Similar to the EF Extension points, and seems to work fine for the time being. I have noticed that the CommandType and CommandParameters are commented out due to serialisation issues. How do you plan on bringing them back in? Also how will we display the CommandText, as its being pushed in, but not displayed |
As far as SQL goes, if you have a look here and do a search for Longer term you shouldn't need the From an Orchard perspective, if Orchard v2 doesn't use EF, the Regarding CommandParameters, they will definitely be coming back. Just need to get the time to make sure we treat that data safely from a serialization perspective. As for why you commands aren't showing up. Not sure. My first instinct was that you weren't using the correct message types, but its clear that you are. My second instinct is that its the fault of the client that is currently in this repo. Specifically, this client is limits what Commands it shows to various scopes... i.e. it will only show Commands that occur within an action or a view component or before or after the action (I think thats he case with the later - its been a while as a replacement client is in the works). This means if Orchards pipeline causes commands to occur outside of these boundaries, they might not show up. Outside of that, it could be a correlation issue (how the begining and end are matched in the current client) or something else. If you are keen, you could try debugging the client a little and see what comes of it. Let me know if any of that rings a bell. |
I have a project I'm working on that has a pluggable data layer. When I use the one implemented with Entity Framework 7 then glimpse shows me the number of DB queries generated by the web request.
When I use old fashioned ado.net code glimpse is not showing me the number of db queries. I'm trying to figure out what I need to change in my ado.net code so that glimpse will be able to see the queries generated by my code.
I know that back in mvc 5 I was able to get glimpse to show me db queries by hooking into the DBProviderFactory that was configured in web.config. Obviously this has changed since web.config is now only for IIS settings.
Can anyone provide me a clue about how to make my ado.net code glimpse friendly?
The text was updated successfully, but these errors were encountered: