cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bhushangholap
Dynatrace Guide
Dynatrace Guide

Are you encountering issues with Dynatrace OneAgent instrumentation in your .NET 8 applications? Whether you’re upgrading from a previous .NET version or working with a new .NET 8 application, this guide will help you resolve common problems related to instrumentation.

Common Issue: Disabled Profiling

One of the primary reasons for instrumentation failures in .NET 8 applications is the configuration of certain environment variable flags. Specifically, the following flags can disable profiling:

  • DOTNET_EnableDiagnostics=0
  • COMPlus_EnableDiagnostics=0
  • DOTNET_EnableDiagnostics_Profiler=0

These flags, when set to 0, prevent the necessary diagnostics and profiling from being enabled in your .NET 8 environment.

Solution: Enable Diagnostics

To resolve this issue and ensure proper instrumentation with Dynatrace OneAgent, you need to either remove these environment variables or set them to 1. Here’s how you can do it:

  1. Locate the Environment Variables:

    • Check your system or application configuration for the presence of the above environment variables.
  2. Modify the Variables:

    • If any of these variables are set to 0, change their value to 1.
    • Alternatively, you can remove these variables entirely if they are not required for other purposes.
  3. Restart Your Application:

    • After making the changes, restart your .NET 8 application to apply the new settings.

By ensuring these environment variables are correctly configured, you can enable profiling and resolve instrumentation issues with Dynatrace OneAgent in your .NET 8 applications.

Reference : 

https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables

https://learn.microsoft.com/en-us/dotnet/core/runtime-config/debugging-profiling 

 

Version history
Last update:
‎24 Oct 2024 03:31 PM
Updated by: