This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
This page explains how to collect traces, trace metrics, runtime metrics, and custom metrics from your Azure Functions. To collect additional metrics, install the Datadog Azure integration.
Datadog recommends pinning the package versions and regularly upgrading to the latest versions of both @datadog/serverless-compat and dd-trace to ensure you have access to enhancements and bug fixes.
Start the Datadog serverless compatibility layer and initialize the Node.js tracer. Add the following lines to your main application entry point file (for example, app.js):
require('@datadog/serverless-compat').start();// This line must come before importing any instrumented module.
consttracer=require('dd-trace').init()
Configure Unified Service Tagging. You can collect metrics from your Azure Functions by installing the Datadog Azure integration. To correlate these metrics with your traces, first set the env, service, and version tags on your resource in Azure. Then, configure the following environment variables. You can add custom tags as DD_TAGS.
You can view your Azure Functions traces in Trace Explorer. Search for the service name you set in the DD_SERVICE environment variable to see your traces.