Profiler chaining for the .NET Framework agent

You can use profiler chaining to run the .NET Framework agent alongside other .NET profiler agents, such as performance or APM tools. To do this, you must enable the agent.dotnet.enable_chaining configuration setting in the third-party tool, and the Contrast .NET Framework agent must be restarted.

Once restarted, the Contrast .NET Framework agent automatically detects the presence of other profiling tools registered with IIS and configures the environment to load both the Contrast .NET Framework agent profiler and the third-party profiler.

The Contrast .NET Framework agent is tested and proven to be compatible with the following profiling tools:

Profiling tool

Versions tested

AppDynamics

4.5.18.1

Dynatrace

1.193.159.20200602-190835

New Relic

8.23.107

Note

The agent is likely compatible with other profiling tools if those tools follow the conventions of the CLR Profiling API and do not make assumptions about the profiling environment.

Depending on how you are using profiler chaining, follow these steps to configure:

  • If you are using profiler chaining with IIS:

    Install the third-party agent, then the Contrast .NET Framework agent.

    (If you install the Contrast .NET Framework agent before the third-party agent, you need to restart the Contrast.NET Main Service under Windows Services.)

  • If you are using profiler chaining outside of IIS:

    Important

    The agent.dotnet.enable_chaining configuration flag will not work if you are using profiler chaining for applications:

    • hosted outside of IIS, or

    • that use the third-party agent's Nuget package (rather than the installed agent).

    If this applies to you, replace the CLR environment variables for the profiling tool with CONTRAST_CCC_CLR versions. Any of these names should be transformed:

    Change this

    To this

    CLR_PROFILER 

    CONTRAST_CCC_CLR_PROFILER

    CLR_PROFILER_PATH

    CONTRAST_CCC_CLR_PROFILER_PATH

    CLR_PROFILER_PATH_32

    CONTRAST_CCC_CLR_PROFILER_PATH_32

    CLR_PROFILER_PATH_64

    CONTRAST_CCC_CLR_PROFILER_PATH_64

    Then follow the usual setup instructions for your environment and application.

  • If you are using profiler chaining with AppInsights in Azure App Service:

    As of version 20.9.3, the Contrast .NET Framework Site Extension now supports compatibility with Application Insights (using the CLR Instrumentation Engine (CIE)).

    There is no further action required to use AppInsights with the Contrast .NET Framework Site Extension. The .NET Framework agent's profiler will be loaded by the CIE if it is registered as the profiling tool in the Azure AppService instance (for example because AppInsights is enabled).