Monday, 20 July 2015

Glimpse and Castle Windsor

Some breaking news in the last week – Microsoft has taken over the sponsorship of Glimpse – an open source diagnostic platform for web applications. Glimpse has been described as the server-side equivalent of your browser’s F12 Developer Tools, so it’s great that first Red Gate and now Microsoft have recognised the value of this tool and supported its development.

I’ve been making use of Glimpse recently to get some more insight into the timing of server-side code. It hooks into the ASP.NET pipeline and gives a useful breakdown of various activities. Depending on what you’re using with your web application, there’s extra extensions that you can add to glean more information – like Web Forms, Entity Framework etc.

Even for things like an Inversion of Control Container can provide interesting data. There’s already extensions for AutoFac and Ninject, but not for Castle Windsor – one of my preferred IoC containers.

I know that there are quite extensive diagnostics provided by Castle’s container – but usually you only see these when you’re debugging, so I thought it might be possible to expose the same information to Glimpse.

And so I created the Glimpse.Castle extension.

It adds a new tab to to the Glimpse dashboard with all that useful detail from the Castle container’s diagnostics service.

Web browser showing Glimpse dashboard

The extension source code is on Github and currently you can build it and run with the latest release of Glimpse. When I get a chance I’ll get it published on NuGet and get it added to the extensions page on the Glimpse website.

2 comments:

Ben Laan said...

Looks good Dave. Can't wait to integrate it..

You've called the glimpse tab 'Castle'.. Shouldn't it be 'Windsor'?

Also, can you get those JSON graphs in the screenshot to start expanded or perhaps a little bit more info showing OOTB?

David Gardiner said...

Good suggestion for tab name change.

Yes, improving the layout of the data is one thing I'd definitely like to do.