Profiler new featureIntegrating with application frameworks
One of the things that makes working with the profiler easier is the fact that it gives you not just information, but information in context.
I was working with an app using Rhino Service Bus, and it really bothered me that I couldn’t immediately figure out what was the trigger for a session. When using ASP.Net or WCF, the profiler can show the URL that triggered the request, but when we are not using a url based mechanism, that turns out to be much harder.
So I set out to fix that, you can see the results below:
This session was generated by a message batch containing messages for MyBooks, MyQueue, etc.
The integration is composed of two parts, first, from the profiler perspective, you now have the ProfilerIntegration.CurrentSessionContext property, which allows you to customize how the profiler detects the current context.
The second part is the integration from the application framework itself, you can see how I did that for Rhino Service Bus, which will dynamically detect the presence of the profiler and fill the appropriate values. The result makes it a lot easier to track down what is going on.