Skip to main content

Export metrics and logs to Datadog

By forwarding Astro data to Datadog, you can integrate Astro into your existing observability practices by analyzing information about your Deployments' performance with Datadog cloud monitoring tools. Currently, you can send the following data to Datadog:

Complete the following setup to authenticate your Deployments to Datadog and forward your observability data to your Datadog instance.

Export task logs to Datadog

You can forward Airflow task logs from a Deployment to Datadog using a Datadog API key. This allows you to view and manage task logs across all Deployments from a centralized observability plane.


  • Your Deployment must run Astro Runtime 9 (AWS) or 9.1 (Azure and GCP) or later. See Upgrade Astro Runtime.


  1. Create a new Datadog API key or copy an existing API key. See API and Application Keys.

  2. Set the following environment variable on your Deployment:

    • Key 1: DATADOG_API_KEY

    • Value 1: Your Datadog API key.


    • Value 2: true

    Select the Secret? checkbox for DATADOG_API_KEY. This ensures that your Datadog API key is saved securely and is not available to Workspace users in plain text.


By default, the Astro Datadog integration also sends a Deployment's Airflow metrics to Datadog. To send only task logs to Datadog, add the following environment variable:

  • Value: true
  1. (Optional) Set the following environment variable on your Deployment to send your logs to a specific Datadog site:

    • Value: Your Datadog Site Parameter. For example,
  2. (Optional) For Astro Runtime 9.2.0 and greater, set the following environment variable on your Deployment to add specific tags to your logs:

    • Value: <tag-key-1>:<tag-value-1>,<tag-key-2>:<tag-value-2>

By default, Astro uses the tags source=astronomer and service=astronomer-task-logs.

Export Airflow metrics to Datadog

Export over 40 Airflow metrics related to the state and performance of your Astro Deployment to Datadog by adding a Datadog API key to your Deployment. These metrics include most information that is available in the Astro UI, as well as additional metrics that Datadog automatically collects, including number of queued tasks, DAG processing time, and more. For a complete list of supported metrics, see Data Collected in the Datadog documentation.


Astro does not export any service checks to Datadog. Information about the general health of your Deployment is available only as part of the Astro UI's Deployment health metric.

  1. Create a new Datadog API key or copy an existing API key. See API and Application Keys.

  2. In the Astro UI, select a Workspace and then select an Astro Deployment for which you want to export metrics.

  3. Create a new environment variable in your Deployment with the Datadog API key from step 1:

    • Value: <Your-Datadog-API-key>.

    Select the Secret? checkbox. This ensures that your Datadog API key is saved securely and is not available to Workspace users in plain text.

  4. (Optional) Add the following environment variable if your organization doesn't use the default Datadog site

    • Value: <Your-Datadog-Site>
  5. (Optional) Add the following environment variables to create custom Datadog tags associated with your Deployment:


    • Value 1: True


    • Value 2: <tag-key-1>:<tag-value-1>,<tag-key-2>:<tag-value-2>

  6. Click Save variable.

After you complete this setup, Astro automatically launches a sidecar container in your Deployment that runs DogStatsD. This container works with your Deployment's existing infrastructure to export Airflow metrics to the Datadog instance associated with your API key.

View metrics in Datadog

  1. In the Datadog UI, go to Metrics > Summary.
  2. Search for metrics starting with airflow and open any Airflow metric.
  3. In the Tags table, check the values for the namespace tag key. The namespaces of the Deployments you configured to export logs should appear as tag values.

To check the health of a Deployment's DogStatsD container, open the datadog.dogstatsd.running metric in the Datadog UI. If the Deployment's namespace appears under the metric's host tag key, its DogStatsD container is healthy and exporting metrics to Datadog.

Was this page helpful?

Sign up for Developer Updates

Get a summary of new Astro features once a month.

You can unsubscribe at any time.
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.