ESB Toolkit Tip #17 Use ETW for high-speed tracing

The .NET Framework’s standard System.Diagnostics.Trace component is often being used for instrumenting .NET applications but when event capture is enabled in the DebugView tool it significantly impacts application performance.  Therefore it’s not suitable to use in a production environment.
If you want to use tracing in all your environments you can use the BizTalk CAT Instrumentation Framework. It’s is a high performance tracing/logging framework for BizTalk that builds upon the Event Tracing for Windows (ETW) infrastructure. Microsoft used essentially the same framework to instrument BizTalk itself, as well as many recently released adapters.

You can use ETW tracing in regular BizTalk artifacts but also in custom ESB Toolkit components it’s possible to implement it.

  • Instrumentation of Itinerary Messaging Services
    Itinerary Messaging Services can be instrumented using TraceManager.PipelineComponent which is dedicated for this type of BizTalk artifacts.

  • Instrumentation of Itinerary Orchestration Services
    As Itinerary Orchestration Service can be complex, the instrumentation is becoming a key factor in helping to diagnose and troubleshoot behavioral problems, performance-related issues and other bottlenecks that were not foreseen or manifested themselves during development.

  • Instrumentation of Custom Components
    Custom .NET components that are executed in Itinerary Services can be instrumented by invoking the trace methods provided by TraceManager.CustomComponent



The examples below illustrates how to use the TraceManager component inside an Itinerary Orchestration Service.TraceManager.WorkflowComponent.TraceInfo




BizTalk CAT Instrumentation Framework Controller

The BizTalk CAT Instrumentation Framework Controller is an easy-to-use GUI for the BizTalk CAT Instrumentation Framework. The Controller lets you start and stop a trace and adjust filter options. It can easily enable real-time tracing to Microsoft SysInternals DebugView , to a log file or to both at the same time.

BizTalk CAT Instrumentation Framework Controller











When you trace to file you can open the file in a Text Editor by clicking on the “Open Log in Text Editor” button.Trace Output in Text Editor





See Also

For more information on ETW tracing see:

Add comment

  Country flag

  • Comment
  • Preview

About the author

Tomasso Groenendijk lives in Netherlands and is a Solution Architect at Insight. He has over 17 years’ experience in software development and software design. Tomasso is specialized in application integration with a strong interest in the Windows Azure cloud platform. From 2014, Tomasso has been awarded four times with the Microsoft Azure MVP award. He is an active contributor to the integration community through his work on his blog, MSDN samples, TechNet Wiki and also speaking on events.

MVP profile Tomasso Groenendijk
Sentinet Product Specialist
BizTalk360 Product Specialist

Month List