LabsThis feature is in Labs.
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.- Create a Dag that calls the investigation API and routes the response to the right downstream action.
- Deploy the Dag to Astro.
- Set up a Dag failure Astro alert that monitors your critical Dags.
- Set the notification channel to Dag Trigger and select the Dag you deployed in step 2.
- Optionally, tailor investigations by adding Otto investigation guidance at the Workspace or Deployment level. See Customize Otto investigation guidance.
- 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_idorASTRO_ORGANIZATION_ID: The ID of the Organization that owns the Deployment you investigate.astro_deployment_idorASTRO_DEPLOYMENT_ID: The ID of the Deployment you investigate.astro_api_tokenorASTRO_API_TOKEN: A Deployment API token with permission to read the Deployment.slack_webhook_urlorSLACK_WEBHOOK_URL: A Slack incoming webhook URL.slack_channelorSLACK_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 withvalidate 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.