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.

The Contrast .NET Framework agent is tested and proven to be compatible with these 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 may also be 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.

To enable profiler chaining, configure the .NET Core agent so that the agent.dotnet.enable_chaining setting is set to true. For example, you could use this YAML configuration:

agent:
  dotnet:
    enable_chaining: true

Once configured, you must restart the agent. On restart, the Contrast .NET Core agent automatically detects the presence of other profiling tools registered with IIS and configures the environment to load both the Contrast .NET Coreagent profiler and the third-party profiler.

Important

If you are using profiler chaining with:

  • IIS:

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

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

  • Outside of IIS:

    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_COR versions. Any of these names should be transformed:

    Change this

    To this

    COR_PROFILER 

    CONTRAST_CCC_COR_PROFILER

    COR_PROFILER_PATH

    CONTRAST_CCC_COR_PROFILER_PATH

    COR_PROFILER_PATH_32

    CONTRAST_CCC_COR_PROFILER_PATH_32

    COR_PROFILER_PATH_64

    CONTRAST_CCC_COR_PROFILER_PATH_64

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

  • 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).