Set up OpenTelemetry monitoring for Azure Functions on Consumption Plan

Dynatrace version 1.240+ OneAgent version 1.193+

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.

Installation

Activate the OneAgent feature

Go to Settings > Preferences > OneAgent features and activate the Forward Tag 4 trace context extension OneAgent feature.

Select a configuration method

  1. In Dynatrace Hub, select OneAgent.
  2. Select Set up > Azure Functions.
  3. On the Enable Monitoring for Azure Functions page, under How will you configure your Azure Functions?, select your preferred configuration method from the dropdown menu.

Specify a Dynatrace API endpoint optional

If you don't want to use the default public Dynatrace endpoint, specify a custom Dynatrace API endpoint where you want to receive monitoring data.

To reduce network latency, you typically deploy a Dynatrace ActiveGate close to (in the same region as) the Azure Function that you want to monitor.

Apply the configuration to your function app

To apply the configuration, select one of the options below, depending on your configuration method.

Instrument the function code

Adding the required API calls to monitor function invocations via OpenTelemetry is specific to languages and their respective OpenTelemetry distribution:

Known limitations

The Dynatrace Azure Functions integration doesn't capture the IP addresses of outgoing HTTP requests. If the called service isn't monitored with Dynatrace OneAgent, this results in unmonitored hosts.