Glimpse 1.2 Released With Support for Entity Framework & ADO

Well, its taken us awhile with everything going on, but we finally have support out for EF and those using “raw” ADO.

New Packages
As usual, to get up and running simply go to Nuget and download the relevant package:

OR if you are just using ADO directly:

If you just download the ADO package, but you are running Entity Framework you will have an exception raised. We have tried our best to make this not the case, but this is a limitation enforced on us by Entity Framework. So good rule of thumb, if you are using Entity Framework download the relevant EF package not just the ADO package.

Also, just because you have a Glimpse.MVC package installed doesn’t mean you automatically get these packages. You need to download the Glimpse.EF (or Glimpse.ADO) packages separately.

What we show
From within the plugin you can expect to see:

  • Connections and how long each connection is opened for
  • Commands associated with those Connections, number of records affected, how long the command took to execute and any errors that may have occured
  • Transactions and which commands are associated with those Transactions and end status

Additionally, the connection and command timing information is feed into the timeline, filling previously undefined gaps:

Technical Details
As you might now, most of the EF’s infrastructure ends up leveraging ADO’s DbProviderFactory infrastructure. As such, this is the where we tap in and from this, we get a fair amount for free (this what also happens to be how we get the build of our raw ADO support).

We also tap into the DbConnectionFactory and in Entity Framework 6 we tap IDbProviderFactoryService and DbProviderServices via the new IDbDependencyResolver infrastructure the EF team has provided. With this I believe we catch the majority of use cases.

For those using Entity Framework or using DbProviderFactory already you shouldn’t have to change any of your code.

Important note
If you happen to use EF in you App_Start, EF gets initialized before Glimpse has a chance to set up. In this case, you will need to include the following lines before your first query runs (an example of how this is used can be found here):


We need your help
Obviously it has taken a significant effort to get to this point. But in order to produce this release in a timely fashion we had to drop 2 main features:

  • N+1 detection, and
  • Execution context (i.e. indicating to the user where the query was triggered from)

We would love some help getting these features in. The first shouldn’t be that hard to implement, the second, might involve a bit more work.

Additionally, Entity Framework 6 has a bunch more information that would be great to expose:

  • Conventions
  • Registered Providers
  • Model Mappings
  • Manifest Details
  • etc

If you are interested in helping out with any of the above, please let us know and we will be more than happy to help – either on the mailing list or via twitter (@anthony_vdh and/or @nikmd23).

Special thanks
Support for Entity Framework and ADO has been a long time coming. An initial prototype for these plugins was written around a year ago, but with everything going on, we never got it to a point where we felt comfortable producing a full release. But since going live with v1 and with some encouragement from K Scott Allen of OdeToCode fame, we have this release. Here is the list of people who helped make this release:

More details will be coming out soon and I will show some more interesting usage scenarios. In the meantime thanks for all your help and let us know what you think.

What else in 1.2
Trying to make sure that the rest of the release isn’t overshadowed by EF/ADO, here is the rest of what is in this release:

  • Core: Fixed issue in timeline which affected sub 1 ms events.
  • Core: Fixed trailing comma that causes problems with some browsers/browser modes.
  • Core: Minor refactoring of MessageCategory classes.
  • Core: Minor update to Nuget transform to show how to turn on logging.
  • Core: Minor update to config page to make sure you always get latest logo.
  • ASP.NET: Fixed issue where config tab would fail to show connection string for connection strings with no provider defined.
  • MVC4: Major fix which adjusts the .NET version that Glimpse.MVC4 is running as (previously was .NET 4.5)

For the above, big shout out to the following people for the great bug reports:

For a full list of changes, issues and commits see below:

  1. Issues in this milestone –
  2. Individual commits made in this milestone –…1.2.0
  3. Enjoy!

One thought on “Glimpse 1.2 Released With Support for Entity Framework & ADO

Leave a Reply

Your email address will not be published. Required fields are marked *