Skip to content

Datadog option for submitting traces and metrics from Azure App Service Linux

License

Notifications You must be signed in to change notification settings

DataDog/datadog-aas-linux

Repository files navigation

This readme outlines how to set up Datadog tracing with your Azure App Service Linux application. Making the following changes in the Azure portal will allow the tracer to initialize when your application is started.

Note: Currently Java, NODE, .NET, PHP and Python are supported.

Application Settings

  • DD_API_KEY is your Datadog API key
  • DD_SITE is the Datadog site parameter (defaults to datadoghq.com)
  • DD_SERVICE is the service name used for this program. Defaults to the name field value in package.json.
  • DD_START_APP is the command used to start your application. For example, node ./bin/www (Unnecessary for Tomcat applications)

General Settings

Node, .NET, PHP or Python

Add the following to the startup command box

  curl -s https://raw.githubusercontent.com/DataDog/datadog-aas-linux/v1.10.10/datadog_wrapper | bash

Java

Download the datadog_wrapper file from the releases and upload it to your application with the Azure CLI command:

  az webapp deploy --resource-group <group-name> --name <app-name> --src-path <path-to-datadog-wrapper> --type=startup

Viewing traces

  1. Azure will restart the application when new Application Settings are saved. However, a restart may be required for the startup command to be recognized by App Services if it is added and saved at a different time.

  2. After the AAS application restarts, the traces can be viewed by searching for the service name (DD_SERVICE) in the APM Service page of your Datadog app.

Custom Metrics

To enable custom metrics for your application with DogStatsD, add DD_CUSTOM_METRICS_ENABLED and set it as true in your Application Settings.

To configure your application to submit metrics, follow the appropriate steps for your runtime.