惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
小众软件
小众软件
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
J
Java Code Geeks
WordPress大学
WordPress大学
The Cloudflare Blog

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis
Monitor Apache Airflow with Datadog
2020-02-24 · via Datadog | The Monitor blog

Apache Airflow is an open source system for programmatically creating, scheduling, and monitoring complex workflows including data processing pipelines. Originally developed by Airbnb in 2014, Airflow is now a part of the Apache Software Foundation and has an active community of contributing developers.

Airflow represents workflows as Directed Acyclic Graphs (DAGs), which are made up of tasks written in Python. This allows Airflow users to programmatically build and modify their workflows.

If you use Airflow to orchestrate your workflows, you’ll want to keep track of the status of your scheduled tasks and ensure that Airflow executes them as expected. We are pleased to announce Datadog’s new integration with Apache Airflow, which takes advantage of Airflow’s StatsD plugin to collect metrics with our DogStatsD service.

apache-airflow-dashboard

As soon as you enable our Airflow integration, you will see key metrics like DAG duration and task status populating an out-of-the-box dashboard, so you can get immediate insight into your Airflow-managed workloads.

Ensure your DAGs don’t drag

Airflow represents each workflow as a series of tasks collected into a DAG. DAGs define the relationships and dependencies between tasks. An Airflow scheduler monitors your DAGs and initiates them based on their schedule. The scheduler then attempts to execute every task within an instantiated DAG (referred to as a DAG Run) in the appropriate order based on each task’s dependencies.

Ideally, the scheduler will execute tasks on time and without delay. The higher the latency of your DAG Runs, the more likely subsequent DAG Runs will start before previous ones have finished executing. Having an increasing number of concurrent DAG Runs may lead to Airflow reaching the max_active_runs limit, causing it to stop scheduling new DAG runs and possibly leading to a timeout of currently scheduled workflows.

You can use the airflow.dag.task.duration.avg metric to monitor the average time it takes to complete a task and help you determine if your DAG runs are lagging or close to timing out. To add context to incoming duration metrics, Datadog’s DogStatsD Mapper feature tags your DAG duration metrics with task_id and dag_id so you can surface particularly slow tasks and DAGs.

airflow_dag_duration

For further insight into workflow performance, you can also track metrics from the Airflow scheduler. For instance, the metric airflow.dagrun.schedule_delay provides you with the duration of time between when a DAG run is supposed to start and when it actually starts. When DAG runs are delayed they can slow down your workflows, causing you to potentially miss service level agreements (SLAs). If you notice unusually long delays, the Airflow documentation recommends improving scheduler latency by increasing your DAG’s max_threads and scheduler_heartbeat_sec during configuration.

Keep tabs on queued tasks

Before an Airflow task completes successfully, it goes through a series of stages including scheduled, queued, and running. After tasks have been scheduled and added to a queue, they will remain idle until they are run by an Airflow worker. Large and complex workflows might risk reaching the limit of Airflow’s concurrency parameter, which dictates how many tasks Airflow can run at once. This may lead your queue to balloon with backed-up tasks. With Datadog, you can create an alert to notify you if the amount of tasks running in a DAG is about to surpass your concurrency limit and cause your queue to inflate and potentially slow down workflow execution.

Dig deeper with Datadog APM

Airflow relies on the background job manager Celery to distribute tasks across multi-node clusters. Datadog APM supports the Celery library, so you can easily trace your tasks. This means you can get visibility into the performance of your distributed workflows, for example with flame graphs that trace tasks executed by Celery workers as they propagate across your infrastructure. This helps surface, for instance, where your DAG runs are experiencing latency. Together, our Airflow and Celery integrations can help you gain a complete picture of your workflow performance as you monitor Airflow metrics and distributed traces.

celery_trace

Datadog goes with the flow

Datadog is pleased to include Apache Airflow into our growing list of over 1,000 integrations, so that you can get comprehensive visibility into your managed workflows. If you’re currently a Datadog user, make sure you have Datadog Agent version 7.17+ so that you can implement DogStatsD Mapper–enabled tagging and get the most out of your Airflow metrics.

If you are not already using Datadog, sign up today for a 14-day free trial.