Support & Documentation
Follow

Enabling for .NET Core applications

NOTE: Support for .NET Core is new with v4.0 of the .NET Agent

Retrace has been tested with .NET Core apps targeting the full .NET framework as well as the new .NET Core "netcoreapp" framework. It also works with ASP.NET Core apps that are deployed behind IIS or using Kestrel only in more of the "self hosted" mode. .NET Core is currently only supported for Windows.

There are potentially 3 different types of .NET Core applications:

  1. ASP.NET Core app that is hosted with/behind IIS
  2. ASP.NET Core app that is running as kestrel only without IIS
  3. A console app or Windows service that is not a web app

The Stackify profiler and agent should automatically profile and track ASP.NET Core apps hosted with IIS. Non IIS apps will require telling the Stackify Retrace agent about your app so that it will be profiled. 

 


To make ASP.NET Core apps work, you must install our middleware.  

1. Add the "StackifyMiddleware" nuget package to your project.

PM> Install-Package StackifyMiddleware

2. Modify your Configure() method in Startup.cs to add our middleware. The order in which you add middleware in your code matters. The StackifyMiddleware must be added before you add MVC via the "app.UseMvc()" method.

app.UseMiddleware<StackifyMiddleware.RequestTracerMiddleware>();

 

 

FYI: Retrace also works with Serilog and NLog for .NET Core apps.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Peter Morris

    Now what? I followed the steps, but where do I configure where I want the logging to be sent? Surely I have to go somewhere and put in a project name etc?

  • Avatar
    Matthew Bonner

    For logging you need to use the Stackify API:
    https://github.com/stackify/stackify-api-dotnet

    The middleware and agent do the rest for you.

    Edited by Matthew Bonner
Powered by Zendesk