Retrace automatically supports Web API transactions that are hosted within an IIS application. If you are "self hosting" Web API in a Windows Service or similar background app, please use these directions.
1. Configure Retrace to know about and profile your application
By default Retrace only profiles IIS applications. Please review this article on how to tell it to profile your application: Enabling Retrace for non IIS applications
2. Add the StackifyWebApiMessageHandler to your application
Web Api can be self hosted in a Windows service or console app, outside of IIS. A MessageHandler needs to be added to your code and can be installed via a nuget package. This MessageHandler allows Retrace to recognize when transactions being and end.
Via nuget: Install-Package StackifyWebApiMessageHandler
Your code will look similar to the example below. You only need to add our MessageHandler.