Monitor Azure Functions using Azure App Service (built-in)
Azure Functions offers a wide range of options to address various Azure Functions scenarios and use-cases:
- Use your preferred language
- Automate deployment
- Take advantage of flexible hosting
Distributed Tracing
With the different options for hosting your functions, Dynatrace provides you with the best options to enable distributed tracing.
- Dynatrace offers an easy integration for Azure Functions running on Appservice- (Dedicated) plan using a site extension.
- Tracing Azure Functions on a Consumption- or Premium-Plan comes with additional restrictions by the nature of a serverless service, such as using instrumentation agents to fully automatically instrument your code at runtime.
Dynatrace provides distributed tracing for these sandboxed environments based on OpenTelemetry. If you already use OpenTelemetry to instrument your functions, you can ingest the trace data using Dynatrace Trace Ingest API, but we recommend that you use the Dynatrace exporter, which adds additional benefits to fully leverage the automatic AI-based analysis capabilities of Dynatrace.
To make using OpenTelemetry easier, Dynatrace provides library packages for Azure Functions to reduce necessary OpenTelemetry boiler-plate code for trace-propagation, applying resource attributes and initialization code as well as aligning with semantic conventions.
By using advanced concepts such as aspect-oriented programming (AOP), it is even possible to add fully automatic instrumentation without changing a single line of code, as demonstrated within this community github-project for Azure Functions .NET.
Additional visibility using logs and platform metrics
To enhance visibility for monitoring your Azure Functions health, we recommend that you enable capturing service metrics from Azure Monitor as well as ingesting logs.