none
Tracing in a Custom Biztalk Adapter

    Question

  • Hi,

    we have developed a custom adapter in BizTalk for BTS 2013  using the BizTalk Adapter Framework(BAF) approach.

    I want to understand how we can implement some tracing in the Adapter code.

    Essentially, once deployed to production, if the adapter fails for some reason, I would like to enable a switch to trigger tracing.

    Has anyone done anything on this lines?

    please assist.

    regards,

    MS

    Tuesday, May 13, 2014 5:36 AM

Answers

  • You can consider implement BizTalk CAT Instrumentation Framework Controller tracing code in your custom adapter.

    Microsoft product team uses this in BizTalk extensively. CAT has been used virtually by all major infrastructure components inside the BizTalk runtime, including EPM, transport adapters, Message Agent, etc.

    Once it’s been implement in your code, it provides the full operational flexibility enables switching the tracing on and off as well as changing the trace level dynamically, making it easy to perform detailed tracing in production environments without requiring reboots or application restarts.

    Performance wise, there is no other tracing component can beat this as of now.

    Read more about this component from MSDN blog:

    Best Practices for Instrumenting High Performance BizTalk Solutions

    Download the code from CodePlex:

    http://btscatifcontroller.codeplex.com/


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, May 13, 2014 9:01 AM

All replies

  • What you can do is incorporate Adapter specific trace switches in the BizTalk Config file which you can enable/disable or set to the appropriate logging level. Then you would use the System.Diagnostics.Trace (http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.trace) to do the tracking through the Adapter Code.

    Alternatively you can look at incorporating the Enterprise Library Logging Block to incorporate tracing in your adapter code. Refer http://msdn.microsoft.com/en-us/library/ff648533.aspx

    Regards.

    Tuesday, May 13, 2014 8:51 AM
  • You can consider implement BizTalk CAT Instrumentation Framework Controller tracing code in your custom adapter.

    Microsoft product team uses this in BizTalk extensively. CAT has been used virtually by all major infrastructure components inside the BizTalk runtime, including EPM, transport adapters, Message Agent, etc.

    Once it’s been implement in your code, it provides the full operational flexibility enables switching the tracing on and off as well as changing the trace level dynamically, making it easy to perform detailed tracing in production environments without requiring reboots or application restarts.

    Performance wise, there is no other tracing component can beat this as of now.

    Read more about this component from MSDN blog:

    Best Practices for Instrumenting High Performance BizTalk Solutions

    Download the code from CodePlex:

    http://btscatifcontroller.codeplex.com/


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, May 13, 2014 9:01 AM
  • Follow M.R.AshwinPrabhu's advice.

    Remember, Trace/Debug in a BizTalk Adapter is no different that Trace/Debug in any other .Net app.

    Tuesday, May 13, 2014 11:51 AM