Trace Azure Functions on consumption plan
Dynatrace uses OpenTelemetry to monitor Azure Functions invocations.
For that purpose, Dynatrace provides language-specific packages, such as
Dynatrace.OpenTelemetry.Instrumentation.AzureFunctions.Core for .NET, that can be used in combination with default OpenTelemetry SDKs and APIs.
Dynatrace version 1.240+
- Activate the Forward Tag 4 trace context extension OneAgent feature. In the Dynatrace menu, go to Settings > Preferences > OneAgent features.
- Note: All OneAgents participating in a trace must meet the minimum OneAgent version of 1.193 for this setting.
To get started
- In the Dynatrace menu, go to Deploy Dynatrace and select Start installation.
- On the Install OneAgent page, select Azure Functions.
Choose a configuration method
The Dynatrace OpenTelemetry integration supports different ways of configuration.
On Enable Monitoring for Azure Functions, under How will you configure your Azure Functions?, select your preferred method from the dropdown menu. Make sure you set all properties for the selected method before copying the generated configuration snippets.
Copy the JSON snippet to the root folder of your Azure Functions deployment into the
Define environment variables for the Azure Function that you want to monitor.
Specify a Dynatrace API endpoint optional
Specify a Dynatrace API endpoint where you want to receive monitoring data.
Typically, in order to reduce network latency, you deploy a Dynatrace ActiveGate in close proximity to (the same region as) the Azure Function that you want to monitor.
Instrument the function code
Adding the required API calls to monitor function invocations via OpenTelemetry is specific to languages and their respective OpenTelemetry distribution.
To get detailed instructions for different languages supported by Dynatrace, see Integrate OpenTelemetry .NET on Azure Functions consumption plan.
The Dynatrace Azure Functions integration doesn't capture IP addresses of outgoing HTTP requests. This results in unmonitored hosts if the called service isn't monitored with Dynatrace OneAgent.