.NET APM on Windows
  • 1 Minute to read
  • Dark
    Light
  • PDF

.NET APM on Windows

  • Dark
    Light
  • PDF

Article summary

Runtimes Supported

.NET Full Framework

  • v4.5.2 (built targetting 4.5.2, but must run under CLR 4.6.1)
  • v4.6.1 and later

. NET Core

  • v2.1 and later (2.1 and 3.1)

.NET

  • v5.0, v6.0, v7.0

For older runtimes/frameworks, see the list of Legacy Profiler Supported Technologies

Application Types

  • ASP.NET Web Applications
  • ASP.NET Core Web Applications
  • Windows Services
  • Command line applications and services
Note

Command line applications and services will need custom instrumentation to track operations unless the application just runs tasks via Quartz.Net scheduling.

Installing the Windows Agent

Make sure that the Windows Retrace Monitoring Agent is installed on your host and that the Retrace agent has been enabled for IIS.

Reference the Windows Install Guide article for detailed information about installing the agent.

Naming Your App

Create a file named Stackify.json and save it in the deployment folder of your application.

{
    "AppName": "MyApp",
    "Environment": "Production"
}

Sending All Exceptions to Retrace

Windows Agent 4.29.20 and later
This functionality was added in the 4.29.20 version of the Windows Agent.

By default the profiler only captures "unhandled" exceptions to avoid the overhead of a first-chance exception handler. However, if you want to capture and upload all first-chance exceptions you can enable this on a per application basis. To enable this, add the setting CaptureAllExceptions to the Stackify.json file as shown in the following example.

{
    "AppName": "MyApp",
    "Environment": "Production",
    "CaptureAllExceptions": true
}

Disabling Tracing per App

If you want to temporarily disable collection of APM data for an application, you can add a property to the Stackify.json file to cause the profiler to be disabled. This does not impact collection of logs that are sent to Retrace.

{
    "AppName": "MyApp",
    "Environment": "Production",
    "DisableTracing": true
}

Changing the Global Default for Tracing

Alternatively, you can change the default behavior for tracing across all applications on a given server to be disabled. This change will make it so that only Apps explicitly configured in their respective Stackify.json file will generate traces.

To change this default tracing behavior, you will need to add a system Environment Variable named StackifyDisableTracing with the Value of true. This Environment Variable will disable tracing on all apps that don't have "DisableTracing": false set in the Stackify.json file.

After adding the Environment Variable and Stackify.json change, restart the server to apply the changes.


Was this article helpful?