Skip to main content
LabsThis feature is in Labs.
Otto investigates Dag failures on Astro using proprietary Airflow, Astro, and Observe context that no general-purpose agent has access to. Each investigation produces a structured diagnosis with a root cause type, severity, suggested fix, and a checklist of Dag- and task-level checks. This page covers Otto investigations that run in the Astro control plane and are triggered from the Astro UI, Astro alerts, or the Astro API. To investigate a Dag failure interactively from the terminal, ask Otto in the Astro CLI. See Otto overview. Astronomer recommends wiring a Dag failure to an investigation automatically. The diagnosis is ready before your team starts triaging, and it can route the failure to the right escalation or remediation path.

How to access investigations

You can trigger an investigation from any of these surfaces:
  • Astro UI: From the DAGs list, click a Dag to open its detail page, then select a failed run to trigger an investigation.
  • Astro Observe homepage: Click Investigate next to a Dag to investigate its most recent failed run, or open a specific run in the Dag’s run history.
  • Catalog: Open a Dag in the new Astro UI Catalog (the Asset Catalog in the legacy UI) and select a failed run from its run history.
  • Astro alerts: When a Dag failure alert fires, open the failed Dag run from the alert notification to start an investigation. See Set up Astro alerts.
  • Astro API: Trigger an investigation programmatically, poll for status, and read the result. Combine this with the Dag Trigger notification channel on an Astro alert to investigate critical Dag failures automatically.

What Otto investigates

Otto draws on Airflow context (including Dag code and task logs), Astro context (including Deployment configuration, component logs, and recent deploys), and Observe context (including lineage, run history, and operational metrics). Organizations that use Astro Observe get a richer investigation, since Otto has access to lineage, the Asset Catalog, and operational metrics in addition to Airflow and Astro context.

Run an automatic investigation

To automatically investigate your critical Dags as soon as they fail, configure Astro alerts to call the investigation API on Dag failure. Otto runs the investigation, and your investigation Dag handles the response.
  1. Create a Dag that calls the investigation API and routes the response to the right downstream action.
  2. Deploy the Dag to Astro.
  3. Set up a Dag failure Astro alert that monitors your critical Dags.
  4. Set the notification channel to Dag Trigger and select the Dag you deployed in step 2.
  5. Optionally, tailor investigations by adding Otto investigation guidance at the Workspace or Deployment level. See Customize Otto investigation guidance.
When a critical Dag fails, the alert fires, the Dag Trigger channel calls your investigation Dag, and Otto returns the diagnosis for downstream handling. Common downstream actions include:
  • Notify: Post the investigation results to Slack, email, or another notification channel.
  • Open a PR: Apply the suggested fix as a pull request.
  • Open an incident: Create an incident in ServiceNow, PagerDuty, or another incident management system.

Example: Post the diagnosis to Slack

The following Dag accepts the Dag Trigger notification payload, calls the investigation API, reads the streamed diagnosis, and posts a Slack message with the root cause type, severity, summary, and suggested fix. Before deploying, configure these as Airflow variables or environment variables on the Deployment:
  • astro_organization_id or ASTRO_ORGANIZATION_ID: The ID of the Organization that owns the Deployment you investigate.
  • astro_deployment_id or ASTRO_DEPLOYMENT_ID: The ID of the Deployment you investigate.
  • astro_api_token or ASTRO_API_TOKEN: A Deployment API token with permission to read the Deployment.
  • slack_webhook_url or SLACK_WEBHOOK_URL: A Slack incoming webhook URL.
  • slack_channel or SLACK_CHANNEL: Optional. The Slack channel to post to, if not the webhook’s default.

Customize Otto investigation guidance

You can add Otto investigation guidance at the Workspace or Deployment level to tailor investigations to your environment. For example, you can instruct Otto to treat tasks that begin with validate as non-blocking, or to interpret specific log patterns in a particular way. Deployments inherit Workspace guidance by default and can override it. See Configure Otto investigation guidance for a Workspace and Configure Otto investigation guidance for a Deployment.