Category Archives: Uncategorized

Application Insights Telemetry in Glimpse

The following is a guest post from Beckylin Orooji, detailing a cool community built Glimpse plugin that exposes Application Insight’s telemetry. You can find out more about it on Beckylin’s post on the Azure Blog.

Glimpse is a great tool for profiling and debugging your web applications during development.  Application Insights is a tool for diagnosing issues and monitoring performance in live production. Because developers need both a great tool during development and a great tool in production, an integration of these products was created.

What is Application Insights?

Application Insights monitors your web application in production for performance, availability, and usage. It helps you understand what your users do with your app, diagnose failed requests and exceptions, and find performance issues in browser, web server or backend services.

What does the integration provide?

Application Insights items are now accessible alongside the other data collected by Glimpse. One place where Application Insights data is shown is in the Glimpse timeline tab. Application Insights automatically collects client and server-side telemetry about requests, outbound calls to dependencies such as http calls, as well as business metrics.

In Glimpse’s Trace tab, log traces and exception reports collected by Application Insights are shown.

The new Application Insights tab shows all the Application Insights telemetry from the client and server that you will be gathering after your application is deployed to production. Looking at the Application Insights tab, you can see exactly what data will be collected for specific pages as you browse through your application. Doing this during development enables you to ensure you have implemented your telemetry collection in the way you intended. After you release your application, this telemetry will be your source of business and diagnostic insights.

Try it now

See this integration in action and try it on your own application by installing one of our two NuGet packages.

Installing the Glimpse Application Insights Web package will turn on Application Insights for your application and enable a basic set of Glimpse packages. This package includes dependencies to other packages you will need for web applications making this a simple solution for everyone. If you have not onboarded to Application Insights, you should use this package. Glimpse Application Insights Web will support .NET web applications without any additional work from you.

Note: If you already onboarded Application Insights and Glimpse, you can consider using the Glimpse Application Insights NuGet package. If you want additional features, you can manually install the ADO.NET, ASP.NET and EnityFramework, or any other extension.

Installing Glimpse v2 Beta1

Yesterday we launched Glimpse v2 Beta1 for ASP.NET 5 and we couldn’t be prouder of this achievement. Over the course of the coming weeks and months we will be sharing lots of tips and tricks on how to use and optimize all the new features of v2. Today, however, we thought we’d start with the absolute basics – how to install it.

Here is Scott Hanselman talking about Glimpse v2 at the ASP.NET 5 RC1 launch at //Connect();.

Here is Scott Hanselman talking about Glimpse v2 at the ASP.NET 5 RC1 launch at //Connect();.

Installing v2 couldn’t be easier. You just need to add the “Glimpse” package to your web project and then add Glimpse to your Startup.cs. This post contains a detailed walkthrough of these steps, just in case you aren’t all that familiar with ASP.NET 5 yet.

NOTE: This release of Glimpse v2 targets ASP.NET 5 RC1 (either Core or full CLR). In the a future release Glimpse v2 will extend support for earlier versions of .NET.

Adding Glimpse Package

Adding the Glimpse package to your web project is quite simple. It can be done either by the new “NuGet” dialog window or directly by updating your project.json. See details on both options below.

“Manage NuGet Packages” Option
If you go down the dialog route, simply right click on your target web project and select “Manage NuGet Packages…”.
Screen Shot 2015-11-19 at 6.41.44 AM
Once the dialog opens, make sure you select the “Include Prerelease” checkbox, and then search for “Glimpse”. Then select the package named “Glimpse” and “Install” it into your project.
Screen Shot 2015-11-19 at 6.42.55 AM

Directly to your project.json Option
It is just as easy to add glimpse via the project.json directly. To do this simply add glimpse to the root dependencies section of your project.json and add "Glimpse": "2.0.0-beta1".
Screen Shot 2015-11-19 at 7.06.34 AM

Updating your Startup.cs

Once the package is referenced in your project, you need to update your Startup.cs so that Glimpse is hooked into your application. Specifically, services.AddGlimpse(); needs to be added to your ConfigureServices(...) method (to register our services with the ServiceCollection) and app.UseGlimpse(); to your Configure(...) method.
Screen Shot 2015-11-19 at 8.29.11 AM

Run your site

Once the above steps are complete, Glimpse will be turned on by default for any request you make from “localhost” moving forwards. This “localhost” restriction can be lifted and other restrictions added in its place or in addition. Look for more details on these configuration and extensions options coming soon.

Screen Shot 2015-11-19 at 8.36.05 AM

If you would like a sample application that already has Glimpse configured and running, feel free to download the Glimpse source and try out the various sample projects.

Glimpse v2 Beta1 Released!

This morning at the Connect(); event in New York city, Scott Hanselman announced some exciting news: Glimpse v2 Beta1 is now available!

Glimpse v2 is a major evolution of the platform. We’re extremely proud of what we’ve accomplished thus far, and we think you’ll like what you see. You’ll find lots of new bells and whistles that make Glimpse better than it ever has been, but I’d like to outline four key improvements to the Glimpse v2 experience.

Curated UI

Glimpse has always been about getting the diagnostics you need, when and where you need them. However, one of the most overwhelming pieces of feedback we have received over the years is that beyond the Heads-Up-Display, those diagnostics were not necessarily well presented and were sometimes difficult to parse.

In v2 we’ve strived to solve these issues by curating disparate data points from across multiple tabs and pulling them together into one cohesive story. We’ve also allowed diagnostics to become the real star, freeing them from the cramped space you’re used to seeing them in, and giving them the full window treatment they deserve; which coincidently makes switching between requests much easier than it was in v1. Take a look for yourself:

Cross Platform

Glimpse v2 is built completely upon ASP.NET 5 API’s, concepts and the CoreCLR. This means that Glimpse v2 automatically inherits all of the benefits of ASP.NET 5, including its ability to run cross platform on Windows, Linux and OSX.

Now everywhere you can run your site, you’ll be able to use Glimpse v2 to debug and diagnose it as well.

Full Stack

Since its inception, Glimpse has been known as “F12 tools for your server”. But as you’ll no doubt know, web development doesn’t happen only on the server.

With this in mind, Glimpse v2 has begun to leverage new browser diagnostic API’s to tell a more complete, full stack story. You’ll now be able to glean insight into some of the processing happening in the browser, right in the context of your server side diagnostics, for many request.


Production Ready

Glimpse really shines during development time. Its ease of installation and use is what’s made Glimpse v1 a favorite among web developers for years. Unfortunately, in many situations Glimpse did not work well once your application was pushed to production.

In Glimpse v2, this all changes. A much larger class of applications will now be able to use Glimpse in production environments to debug and diagnose problems in real time.

In the coming weeks we’ll devote more of this blog to covering the ins and outs of these four key features, as well as other changes, and cover exactly what they mean for you.

βeta Beware

Of course, it wouldn’t be responsible for me to cover all of the greatness that is Glimpse v2 without also reviewing its current limitations and known issues.

First of all, what we’re releasing today is an early beta build meant for gathering feedback from users and extension authors. It may have a few rough edges, the user interface is a work in progress and it certainly isn’t feature complete. Look for more stable builds, improved UX and the re-introduction of beloved features such as Timeline and the Trace tab in the future.

It’s also worth noting that Glimpse v2 Beta1 only runs on ASP.NET 5. While using the latest and greatest does have its own perks, for existing applications you’ll need to stick with Glimpse v1. That also means that Glimpse v1 extensions are incompatible with Glimpse v2. In the future we’re going to bridge this gap so that everyone, including .NET 4.5 and .NET 4.0 users will be able to benefit from the new features of Glimpse v2.

Next Steps

Over the next several weeks, keep an eye on this blog and our GitHub repository where we’ll continue to improve Glimpse v2, support and update along with ASP.NET 5 and march towards a full, final 2.0 release.

In the mean time, install Beta1 and give it a try.

We really hope that you enjoy this release and are excited about the direction Glimpse is going, but more than anything else, we’re excited to hear your feedback.

Glimpse and Microsoft join forces

It is my pleasure to announce that moving forward the sponsorship of Glimpse is being taken over by Microsoft. More details around the the particulars will be coming out soon, but for the here and now there are fairly comprehensive writeup’s on the Visual Studio and Asp.Net blog’s, as well as our own blog’s (Anthony van der Hoorn and Nik Molnar).


For the last 3 years Glimpse has been lucky enough to be sponsored by Red Gate. This relationship has been amazing and has made it possible for us to get to where we are today. That said, moving forward and for where we want to take the project (deeper integration into Asp.Net, as well as going cross platform and working on other web stacks), Microsoft is a really great fit.

Looking forward to bring you more details, as well as making Glimpse even more awesome.

Version 1.9.2 for Asp.Net Released

As these things go, we’re still hard at work on getting the various bits in place so we get get Glimpse v2 into your hands as soon as possible. In the mean time, this release has got a few fixes that have come in from the community since our last release. It focuses on a couple of small Asp.Net features/fixes and a fix to an annoying bug that effected some EF users.

This release sees updates to following packages:

  • Glimpse.AspNet – Featherweight release 1.9.2
    • Added support for AspNetSynchronizationContext
    • Added support for Build Mode detection of assemblies in Environment tab
  • Glimpse.EF* – Featherweight release 1.6.5
    • Fix bug lead to cast exceptions on GlimpseDbConnection by loosen GetDbProviderManifestToken behavior

Special Thanks
In terms of pull requests, I have to say a big thanks to:

  • jasonkenneth
    • #836 Loosen GetDbProviderManifestToken behavior
  • Lohith
    • #823 Implement Build Mode detection of assemblies in Environment tab

Well, as usual, I think that is a wrap. For a full list of changes, issues and commits see below:

Thanks to everyone involved and enjoy the release!

Version 1.7.3 for ADO Released

This release it a fairly minor one to fix a rather painful bug that went out in EF 6.1.1. This error revolved around a NullReferenceException that would be generated when users upgraded to EF 6.1.1.

With help from the guys on the EF team, we narrowed down the issue:

Basically in ClonedObjectContext, EF first disposes of the Glimpse connection, and then EF disposes of EntityConnection (which then tries to unsubscribe from the state change event). Fix is to simply change the order of those calls in EF.

Unfortunately with EF 6.1.1 being in the wild now, it was important that Glimpse could work around this issue. Hence, additional checks where added to Glimpse.ADO in this release to work around this issue.

This release sees updates to following packages:

  • Glimpse.ADO – Featherweight release 1.7.3
    • Conduct an additional null check around the StateChange event (fixes bug in EF 6.1.1)
  • Glimpse.EF* – Featherweight release 1.6.4
    • Update to work around bug in EF 6.1.1

And for the great issue reports, I want to thank:

Also I would like to say a very big thanks to the EF team, specifically:

  • Maurycy Markowski
  • Arthur Vickers & Lawrence Jones
  • Rowan Miller

Well, as usual, I think that is a wrap. For a full list of changes, issues and commits see below:

Glimpse 1.8.6 released

Its that time again and we have another release ready to go. This one is mainly another patch/bug release, but it also a couple of nice things come to the table.

Glimpse Launcher
One of the biggest things to note is the addition of a new button to the `~/glimpse.axd` page. This button is designed to be a temporary fix to help those who have sites that contain only services. Currently its difficult for these users to launch Glimpse. In most cases it requires adding a dummy page to the site, so that Glimpse can be launched from that point. This new button allows the user to launches the client in fullscreen mode. From there, the history tab can be used to track requests.

Launch Glimpse in FullScreen Mode

Launch Glimpse in FullScreen Mode

Note, there is currently a limitation on this feature which means the client will only launch if Glimpse has already detected at least one request. If this limitation causes you any issues please let us know. Additionally, v2 of Glimpse will bring to the table first class support for services.

This release sees updates to following packages:

  • Glimpse.Core – Featherweight release 1.8.6
    • Add button which makes it easy to launch glimpse for service only sites
    • Improve how client renders for those using Zurb Foundation
  • Glimpse.AspNet – Featherweight release 1.9.1
    • Fix issue for ajax requests that are using “Bufferless input streams”
    • Show non-MvcRoute route types in route tab
  • Glimpse.WebForms – Featherweight release 1.1.1
    • Fix issue to make Glimpse checks if it is enabled in DataBoundControlAdapter
  • Glimpse.Ado – Featherweight release 1.7.2
    • Ensure ADO inspector does quotes `AnsiString` parameters in query output
    • Ensure that all parameters in `CreateDbCommandDefinition` are forwarded through
    • Prevent command sanitizer from replacing partial matches of parameters

In terms of pull requests, I have to say a big thanks to:

  • Kristian Hellang
    • #802 – Prevent command sanitizer from replacing partial matches of parameters
  • Thomas Zitzler
    • #806 – Fix issue for ajax requests that are using “Bufferless input streams”
    • #803 – Ensure that all parameters in `CreateDbCommandDefinition` are forwarded
  • grahammendick
    • #789 – Fix issue to make Glimpse checks if it is enabled in DataBoundControlAdapter
  • Boris S
    • #783 – Fix issue to make Glimpse checks if it is enabled in DataBoundControlAdapter

And for the great issue reports, I want to thank:

Well I think that is a wrap. For a full list of changes, issues and commits see below:

Glimpse 1.8.5 released

Its that time again and we have another release ready to go. This one is mainly another patch/bug release, but it also sees support for Attribute routes come to the table.

In addition, there has been a fairly sizeable fix released for Entity Framework which affected people trying to use Glimpse.EF6 with EF 6.1.0 – 6.2.0-beta. This has taken a little to track down, and I would like to thank everyone involved in sorting this out and coming up with the fix (especially the guys on the EF team… HUGE thanks guys!!!).

This release sees updates to following packages:

  • Glimpse.Core – Featherweight release 1.8.5
    • Fix where Clients that have a name with quotes in it blows up
  • Glimpse.AspNet – Bantamweight release 1.9.0
    • Added support for attribute routes
  • Glimpse.Ado – Welterweight release 1.7.1
    • Significant performance improvement when calling stored procedure with binary data param
  • Glimpse.Ef* – Welterweight release 1.6.2
    • Fixed possible NullReferenceException in Glimpse that was surfaced with EF 6.0.2
    • Introduced workaround for bug that was introduced in EF 6.1.0 – 6.2.0-beta

In terms of pull requests, I have to say a big thanks to:

And for the great issue reports, I want to thank:

Well I think that is a wrap. For a full list of changes, issues and commits see below:

Glimpse 1.8.3 released – Insights removed

Today we had an unscheduled release of Glimpse. This was to remove the Insights “feature” which was introduced in the last release – 1.8.2. Its removal is based on the feedback we received from the community since going live.

For a long time now, we have been trying to work on ways to get better feedback about how people use Glimpse. We routinely hear from people on Twitter, via the issue list and at conferences, unfortunately, this feedback is fairly anecdotal and hard to quantify. We decided to try and get usage analytics directly from the client itself.

In thinking about this, we decided to ask the community what they thought. Before we release 1.8.2, we posted our thoughts on this blog – Getting greater insights into Glimpse – and out on Twitter, asking for feedback, and received no negative response.

This morning, we received feedback from the community that the Insights feature isn’t desired (at least in its current form) and until we can make a decision as a community, we have removed the feature and released this update.

Moving Forward
From this experience, its clear that the communication channels that we have, and the process of lazy consensus, can’t adequately cover all situations. In addition, for changes such as this, we should work much harder to get/force a response from the community before moving forward.

I’m happy that the we where able to respond to community feedback quickly and hope that we can continue to do so in the future.

Thanks to those who participated in the discussion and I’m glad we came to a good outcome.

Glimpse 1.6.0 released

Since our last release a fair bit of time has passed. Most of this has been taken up with speaking at MonkeySpace (expect a post on this in the future) and trying to take a good swat at knocking off a few key bugs that have been building up. That said we did manage to squeeze in a few useful new features.

Server Timing
We got a few requests come through to show the time on the server. This is useful for tracking down inconstancies in the time between the client and server or delta between the server and a trusted time source (some public NTP source for example). Time can also become important when dealing with things such as encryption / authentication, or when server has issues with wrong DST settings.

Here is a screenshot of what to expect:
This shows shows full server time, if DLS is in effect and delta between client and server time.

Environment Tab
We have also made some updates to the Environment Tab to show more version information. The thought process is that with Nuget packages that are starting to use the full SemVer spec (specifically pre-release and build metadata) just showing the standard version isn’t enough any more. Packages like EntityFramework have the same version number during the whole pre-release cycle, but have different package versions. Hence now, we show the full version number that is used in Nuget if its available.

This is what the new details look like:

This is useful when you want to confirm that the correct version of a package installed.

Release Notes

  • Glimpse.Core – Welterweight release 1.6.0
    • Add server “clock” time to HUD (shows full server time, if DLS is in effect and difference between client and server time)
    • Update to client to pulse tabs to try and show that the state context has changed
    • Update to client to show a loading message (instead of an error message) to give the data a chance to load
    • Update to client for Principal vs. Principle
    • Update to client to support object values having layouts
    • Fix bug where JSON.NET could screw up self reference loops
    • Fix small typo in update notification on glimpse.axd
  • Glimpse.ASP.NET – Middleweight release 1.4.0
    • Add server “clock” time to HUD (shows full server time, if DLS is in effect and difference between client and server time)
    • Update Environment tab update to show more version Info
    • Fixed issue where tabs could randomly disappear in some cases
    • Fixed issue where calls to HttpContext.Request in IIS7 Integrated mode threw exceptions
    • Fixed issue where query string parameters with a null key would throw an exception
    • Fixed issue to make Glimpse NuGet package discovery more stable
    • Update to make the injection of the the script tags into the rendered pages more robust
    • Update Environment tab to make it more realilant to exceptions in different protection modes
    • Update to make it easier to get Glimpse working when using dynamic compression
  • Glimpse.MVC* – Featherweight release 1.3.3
    • Minor adjustment to bring NuGetPackage inline with eachother
  • Glimpse.ADO – Lightweight release 1.5.0
    • Add support for profiling DbDataAdapter.Fill() correctly

Special Thanks
In terms of pull requests, I have to say a big thanks to:

And for the great issue reports, I want to thank:

Release Details
Well I think that is a wrap. For a full list of changes, issues and commits see below:

Side Note
We currently know there is an issue with our EF6 package being broken with EF6 Beta1. We hope to have this fixed soon.

Parting words
Let us know if you have any thoughts or comments and I hope you enjoy this release.