Setting up .NET Framework tracing on IIS

You can set up tracing for .NET Framework applications hosted on Internet Information Services (IIS) by using Instana AutoTrace. The Instana agent automatically configures environment variables and registers tracing components for IIS-hosted applications.

This topic covers the following:

Before you begin

To set up .NET Framework tracing on IIS, complete the following steps:

  • Ensure that the Instana agent is running on the host machine. See Installing agent on Windows.
  • Verify that InstanaPCP is running on the host machine. InstanaPCP enables the Instana agent to communicate with your .NET Framework application. To check whether InstanaPCP is running, open Task Manager on Windows and look for InstanaPCP.exe.
  • Verify that your application runs on .NET Framework 4.5.2 or later.
  • Review support information.

Enabling tracing

For .NET applications hosted in IIS, the Instana tracing extension (CLR Tracer) is automatically installed when you install the Instana host agent. InstanaPCP automatically sets the environment variables needed for .NET Framework auto tracing in the Registry and installs the Instana tracing DLLs to the Global Assembly Cache (GAC).

To enable tracing for IIS-hosted applications, complete the following steps:

  1. Verify that tracing is enabled in the agent configuration.yaml file:

    # .NET Full Framework tracing
    com.instana.plugin.clr:
      tracing:
        enabled: true
    Note: The sensor and tracing extensions are enabled by default.
  2. Optional: If your application is multi-domain, set the environment variable INSTANA_NET_ENABLE_MULTIDOMAIN to true.

  3. After the Instana agent and InstanaPCP application start running, run the iisreset command:

    iisreset
    Important: If IIS is not reset, IIS workers aren't instrumented, and you cannot trace IIS-hosted applications. You must reset IIS even if the application was previously instrumented.
  4. Start your application.