Enable OpenTelemetry in the .NET Agent

To enable the .NET Agent for OpenTelemetry, you need:
Add the following environment variable in the process that executes your .NET application:
  1. Enable OpenTelemetry:
    CODE
    APPDYNAMICS_OPENTELEMETRY_ENABLED=true
  2. Set the trace exporter to OTLP (the OpenTelemetry-enabled .NET Agent will send OpenTelemetry spans in the OTLP format):
    CODE
    OTEL_TRACES_EXPORTER=otlp
  3. Set the tier name (in service.name) and application name (in service.namespace) for the application:
    Warning: If you do not set the tier name in service.name, the value defaults to the tier name originally registered by the .NET Agent (when the tier was first instrumented by Splunk AppDynamics).
    CODE
    OTEL_RESOURCE_ATTRIBUTES=service.name=myServiceName,service.namespace=myServiceNameSpace
    You also have the option to set tier and application names in your OpenTelemetry otel-config.yml file. See Set service.nameandservice.namespace to Your Application and Tier Names.