If you instrumented your .NET functions by following Trace Azure Functions written in .NET, remove using Dynatrace.OpenTelemetry* from your software and all other code you added based on that instruction.
Because Azure Functions on Linux has no native extension point, OneAgent is packaged as a runtime-specific deployment dependency. Dynatrace provides packages for all supported runtimes, meaning no changes to your function code are required.
Use the setup wizard in Dynatrace to generate configuration values tailored to your runtime and Dynatrace environment.
In Deploy Dynatrace, select Azure Functions, then complete the wizard:
Select your runtime (Python or .NET).
Select your Azure Functions hosting option (for example, Linux Flex Consumption).
Select the specific OneAgent version.
Optional Enter a specific ActiveGate URL.
Enter your Resource group. The wizard uses it to generate valid commands and settings.
Enter your Function app name (if you use Azure CLI) .
The wizard generates:
Add the environment variables from the wizard to your function app's Application Settings. You can do this in the Azure portal under Settings > Configuration > Application Settings, or use the Azure CLI snippet the wizard provides.
The environment variables register OneAgent with the language runtime before your function executes. They enable automatic instrumentation at runtime, so you don't need to modify your function code.
Store DT_CONNECTION_AUTH_TOKEN as an Azure Key Vault secret and reference it in your Application Settings rather than pasting the token value directly. This reduces the risk of unintentionally leaking the token.
Add the runtime-specific OneAgent package as a dependency in your project using the version the wizard specifies.
Redeploy your function app. Azure Functions installs the package automatically during deployment, and OneAgent starts monitoring from the first invocation.