Monitoring & Troubleshooting
Signals, diagnosis, and the action they drive
A streaming pipeline backs up overnight. The backlog chart climbs, an alert fires, and you have ten minutes before the on-call escalation. Where do you look? The answer is never "open one console and scroll": it is to pick the signal that matches the question. Observability on Google Cloud gives you three kinds of signal, and each answers a different question.
The three signal sources
Metrics are numeric time series. They answer is a rate or a backlog wrong right now? A metric is cheap to store, easy to chart, and the only signal you can threshold-alert on directly. Dataflow backlog seconds, BigQuery slot utilization, and Pub/Sub message age are all metrics.
Logs are timestamped text events. They answer what exactly failed, and why? A log entry carries the stack trace, the rejected row, the permission that was denied. You cannot alert on a log directly: you first turn matching entries into a log-based metric[1], then alert on that metric.
Job introspection is the per-run, per-stage view a specific service keeps about its own work. It answers which run, which stage, which query is the problem? In BigQuery that is INFORMATION_SCHEMA.JOBS and the administrative resource charts[2]; in Dataflow it is the job-metrics tab; in Cloud Composer it is the Airflow DAG view.
The discipline is to map the question to the signal. "Backlog is growing" is a metric. "The job that processes the backlog is throwing exceptions" is a log. "One Beam stage is a straggler while the rest idle" is job introspection. Reaching for the wrong source is the most common reason a simple incident takes an hour.
From signal to action
Diagnosis is not the end. Each signal leads to a bounded operational action: cancel a runaway job, route a heavy query to its own slot pool, request a quota increase, or acknowledge that the fix lives in another discipline (resize capacity, change the query, add a retry). The scope of this page is seeing and diagnosing, then taking the immediate action; deciding how much capacity to buy or how to make the workload cheaper is covered in the sibling subtopics.
Watching the platform: metrics, logs, alerting
Google Cloud Observability is the current name for the suite once branded Stackdriver, and its docs still live under the stackdriver path. It bundles Cloud Monitoring[3] (metrics, dashboards, uptime checks, alerting), Cloud Logging[4] (logs), Cloud Trace (distributed tracing), Cloud Profiler (continuous profiling), and Error Reporting[5]. For data workloads you live mostly in Monitoring and Logging; Trace and Profiler matter when a service in the pipeline is itself the latency suspect.
Cloud Monitoring: dashboards and alerts
An alerting policy[3] bundles a condition (a metric, a threshold, an aggregation), one or more notification channels (email, PagerDuty, Slack, Pub/Sub, the mobile app), and documentation shown in the notification. When the condition holds it opens an incident and notifies. A metrics scope lets one scoping project view metrics from many projects and even AWS accounts, which is how you watch a whole data platform from a single pane.
When you alert, alert on user-felt symptoms. Google SRE's four golden signals[6] are latency, traffic, errors, and saturation; anchoring alerts to these and to an SLO beats alerting on an internal cause like a single CPU spike that may not affect anyone.
Cloud Logging: from text to a metric you can alert on
Every log entry passes through the Log Router[4], which evaluates sinks. Each sink has an inclusion filter and a destination, so you decide where copies of matching logs go: a Cloud Logging bucket (keep and search), a BigQuery dataset (SQL analysis), a Cloud Storage bucket (cheap long-term archive), or a Pub/Sub topic (stream to a third-party SIEM). The same routing fact governs retention: retention is a property of the bucket, not the entry. The _Default bucket keeps everything for 30 days; the _Required bucket holds Admin Activity and required audit logs for a fixed 400 days; a user-defined bucket can be set from 1 day up to 3650 days. To keep audit logs past 400 days you route them through a sink to a custom bucket or to Cloud Storage.
You cannot put an alert on a raw log. Instead you create a log-based metric[1]: a counter metric counts entries matching a filter, and a distribution metric extracts a number from each matching entry (a parsed latency, say) and builds a histogram. Then you alert on the metric. This two-step (log filter to metric, metric to alert) is the standard way to page on "errors of type X are now happening".
Grouping errors and tracing latency
Error Reporting aggregates error events from running services by reading log entries and recognizing stack traces. It groups errors by exception type and the top stack frames and can notify on a new error, so a single recurring failure shows up as one group rather than a thousand identical lines. For latency that crosses service boundaries, Cloud Trace records a request as a trace of spans as it fans out and shows aggregate latency on a heatmap, pinpointing which hop ate the time.
Diagnosing data jobs: BigQuery, Dataflow, Composer
The platform signals tell you something is wrong; the per-service job views tell you which job and which part of it. Three views cover almost every PDE scenario.
BigQuery: INFORMATION_SCHEMA.JOBS and the query plan
INFORMATION_SCHEMA.JOBS is the audit trail of BigQuery jobs, queryable with SQL. The JOBS_BY_PROJECT view (and its JOBS_BY_USER, JOBS_BY_FOLDER, JOBS_BY_ORGANIZATION siblings) exposes running jobs plus job history for the past 180 days[7]. The columns that matter for cost and performance triage are total_bytes_processed and total_bytes_billed (on-demand cost driver), total_slot_ms (slot-time consumed), job_type and statement_type, state, error_result (why a job failed), and creation_time. A scheduled query over this view that sums total_bytes_billed by user_email or by day is the standard "who is spending the slots/bytes" report.
For a single slow query, open the query plan and execution details[8] (Query Insights). It breaks a query into stages, each reporting slot wait time, shuffle bytes (data exchanged between stages), and records read versus written. The reading is mechanical: high slot wait time means slot contention (a concurrency problem, fixed with more slots); large shuffle bytes mean a big join or data skew (fixed by denormalizing); records read far larger than the result means scanning too much (fixed with partitioning, clustering, or a tighter filter).
Dataflow: the job-metrics tab
A streaming Dataflow job is healthy when it keeps up with its input. The job-metrics tab[9] exposes the signals that say whether it does. Data freshness is the gap between an element's event-time timestamp and when it is processed; system latency is the current maximum seconds an element has been processing or waiting. Rising data freshness with rising backlog seconds (the estimated time to drain the current backlog) is the classic "can't keep up" picture; the autoscaling chart then shows whether workers are scaling toward the target. For the source side, watch the Pub/Sub subscription's subscription/oldest_unacked_message_age to see how stale the oldest unconsumed message is.
Cloud Composer: the Airflow view
Cloud Composer[10] is managed Apache Airflow, where a workflow is a DAG of tasks and a task runs only after its upstream tasks succeed. You diagnose an orchestration failure in the Airflow UI: the grid and graph views show which task instance failed, and the per-task logs (also in Cloud Logging) show why. Because Composer stores DAGs, logs, and plugins in its environment's Cloud Storage bucket, a failed run's logs are durable and searchable after the fact.
Planned usage: slots, quotas, and budgets
Monitoring is not only for incidents; capacity and cost are signals you watch before they break. Three of them recur on the exam, and the trap is conflating what each one actually does.
Slot utilization
When BigQuery runs on capacity (editions) pricing, queries draw slots from reservations[11]. The administrative resource charts show slot usage, job concurrency, and job execution over time, so you can see whether queries are waiting on slots (the same slot-wait signal the query plan reports, viewed at the project level). One nuance worth internalizing: slots speed up running a query but do not change how many bytes a poorly-laid-out query must scan, so a single slow query is usually a layout problem, not a slot shortage.
Quotas versus budgets: the load-bearing distinction
These two look similar and behave oppositely. A quota is a hard limit[12]: when a request would exceed it, the system blocks the request and the operation fails. Quotas protect the shared platform and protect you from runaway usage, so they can actually prevent consumption. A Cloud Billing budget[13] does the opposite: it is notification-only and does not cap or stop spending. Default budget thresholds alert at 50%, 90%, and 100% of the amount you set, measured against actual or forecasted cost, and alerts can be routed to Pub/Sub for automated responses.
The reconciling rule: if you must stop runaway usage, a quota is the lever; a budget only tells you it is happening. To attribute the spend a budget warned about, Cloud Billing Reports[14] breaks cost down by project, service, SKU, location, label, and time, with forecasted as well as actual figures.
When a quota actually bites
A quota-exceeded error is not transient, so retrying with backoff alone will keep failing once a hard limit is reached. The fix is to request a quota adjustment[15] in Cloud Quotas; in most cases increases are made at the project level, and adjustment requests are subject to review (you receive an email acknowledging the request). Rate limits (per-minute or per-second caps) differ from absolute quotas: they smooth bursts, so client-side retry with exponential backoff is the right response to a rate-limit error, whereas a hit absolute quota needs the increase.
Exam-pattern recognition
PDE questions in this area read as short operational scenarios. The decision usually hinges on matching the symptom to the right signal source, or on the quota-versus-budget distinction. The patterns below recur.
"The pipeline is falling behind"
Stem: a streaming Dataflow job's output is increasingly stale, or a Pub/Sub subscription's backlog grows. Right answer: inspect Dataflow data freshness / system latency and backlog seconds, and the Pub/Sub oldest_unacked_message_age, to confirm the job cannot keep up, then check whether autoscaling is hitting its worker ceiling. Distractors point you at BigQuery slots (wrong service) or at adding a budget (a budget never speeds anything up).
"Find what made BigQuery expensive"
Stem: cost spiked and you must identify the culprit query or user. Right answer: query INFORMATION_SCHEMA.JOBS summing total_bytes_billed (on-demand) or total_slot_ms (capacity) by user or query; remember it covers the past 180 days. Distractors suggest Cloud Billing Reports alone (good for service/SKU attribution but not per-query) or guessing from the budget alert (it tells you spend rose, not which query).
"A single query is slow"
Stem: one query is slow while others are fine. Right answer: read the query plan in Query Insights; high slot wait means contention (add slots), large shuffle means a skewed join (denormalize), oversized records-read means a scan problem (partition/cluster/filter). Distractor: "buy more slots" when the plan shows a scan problem that more slots will not fix.
"Quota exceeded" versus "budget exceeded"
This is the single most common trap. A quota-exceeded error means a hard limit was hit and the operation failed: request a quota increase in Cloud Quotas (project-level, subject to review). A budget alert means spend crossed a threshold and nothing was stopped: it is a prompt to investigate, never an automatic cap. If a question asks how to prevent a service from being used past a point, the answer is a quota, not a budget. If it asks how to be warned about cost, the answer is a budget.
"Alert me when errors of type X happen"
Stem: you want a page when a specific error appears in logs. Right answer: build a log-based metric over a log filter, then attach an alerting policy to that metric. Distractor: "set an alert directly on the log", which the platform does not support; you always go log filter to metric to alert.
"Stop the runaway job now"
Stem: a job is consuming far more than expected. Right answer: cancel the specific BigQuery or Dataflow job (the immediate action), then diagnose with the job views. Routing heavy versus interactive queries into separate reservations prevents recurrence, but the in-flight fix is to cancel.
Three signal sources for data-workload observability
| Signal source | Metrics (Cloud Monitoring) | Logs (Cloud Logging) | Job introspection |
|---|---|---|---|
| Question it answers | Is a rate or backlog wrong now? | What exactly failed and why? | Which run/stage/query is the problem? |
| Data shape | Numeric time series | Timestamped text events | Per-job rows and execution plans |
| Primary tools | Dashboards, alerting policies, uptime checks | Log Explorer, log-based metrics, sinks | INFORMATION_SCHEMA.JOBS, BQ admin charts, Dataflow metrics tab, Airflow UI |
| Alert mechanism | Alerting policy on a metric threshold | Log-based metric, then alert on it | Scheduled query over JOBS, or export to monitoring |
| Retention | Metric-type dependent | Log-bucket dependent (30 days _Default) | JOBS: 180 days of job history |
| Best for | Backlog, latency, slot and quota usage | Stack traces, root cause, audit trail | Cost per query, straggler stage, failed run |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- Match the symptom to metrics, logs, or job introspection
Observability gives three signal kinds and each answers a different question: metrics (numeric time series in Cloud Monitoring) tell you whether a rate or backlog is wrong now, logs (text events in Cloud Logging) tell you what failed and why, and per-service job introspection (BigQuery
INFORMATION_SCHEMA.JOBS, the Dataflow job-metrics tab, the Airflow UI) tells you which run or stage is at fault. Reach for the source that fits the question instead of scrolling one console; a growing backlog is a metric, its stack trace is a log, and the straggler stage is job introspection.- You cannot alert on a raw log; turn it into a metric first
Cloud Monitoring alerting policies fire on metric thresholds, not on log text, so to page on a specific log event you create a log-based metric over a log filter and then attach an alerting policy to that metric. A counter log-based metric counts entries matching the filter; a distribution log-based metric extracts a number from each matching entry (such as a parsed latency) and builds a histogram. The flow is always log filter, then metric, then alert.
Trap Trying to attach an alerting policy directly to a log entry; Cloud Monitoring conditions evaluate metrics, so the log must become a log-based metric first.
5 questions test this
- Your organization runs business-critical BigQuery batch jobs nightly. You need to be automatically notified when any of these jobs fail so…
- Your Cloud Composer environment runs data pipeline DAGs that process critical business data. You need to implement alerting to notify your…
- Your organization runs multiple Dataproc clusters across several Google Cloud projects. You need to create a centralized monitoring…
- Your organization uses Cloud Composer in production and wants to implement a robust alerting system for DAG failures and SLA misses. The…
- Your team manages critical ETL pipelines running on Cloud Composer. You need to implement alerting so that operations staff receive…
- Log retention is a property of the bucket, not the entry
Cloud Logging keeps entries for as long as the log bucket they land in is configured to, not per entry. The
_Defaultbucket retains everything for 30 days, the_Requiredbucket holds Admin Activity and required audit logs for a fixed 400 days, and a user-defined bucket can be set from 1 day up to 3650 days (10 years). To keep audit logs past 400 days you route them through a Log Router sink to a custom bucket or to Cloud Storage.Trap Assuming the _Required audit-log bucket's 400-day retention is configurable; it is fixed, so longer audit retention needs a sink to another bucket or Cloud Storage.
- The Log Router sends matching entries to four sink destinations
Every Cloud Logging entry passes through the Log Router, which evaluates sinks; each sink has an inclusion filter and one destination. A sink can write to a Cloud Logging bucket (keep and search), a BigQuery dataset (SQL analysis), a Cloud Storage bucket (cheap long-term archive), or a Pub/Sub topic (stream to a third-party SIEM or custom processor). Choosing the destination by intent is how you both retain and analyze the right logs.
Trap Picking a Cloud Storage sink when the goal is to run SQL over the logs; Cloud Storage is cheap archive, but querying needs the BigQuery dataset destination.
- Alert on user-felt symptoms, the four golden signals
Google SRE's four golden signals to monitor for any user-facing service are latency, traffic, errors, and saturation. Anchor alerts to these symptoms and to an SLO rather than to an internal cause such as a single CPU spike, because a CPU blip that no user feels is noise while a latency or error climb is the thing worth paging on.
- Error Reporting groups recurring failures so one bug is one entry
Error Reporting reads log entries from running services, recognizes stack traces, and groups errors by exception type and the top stack frames, so a single recurring failure surfaces as one group rather than thousands of identical lines, and it can notify on a new error. It samples up to about 1,000 errors per hour and estimates counts beyond that, so treat the count as an estimate at high volume.
- INFORMATION_SCHEMA.JOBS is the 180-day BigQuery job audit trail
Query
INFORMATION_SCHEMA.JOBS(and itsJOBS_BY_USER,JOBS_BY_FOLDER,JOBS_BY_ORGANIZATIONviews) with SQL to see running jobs plus job history for the past 180 days. The columns that drive cost and performance triage aretotal_bytes_billed(the on-demand cost driver),total_slot_ms(slot-time consumed),job_type/statement_type,state, anderror_resultfor why a job failed. A scheduled query summingtotal_bytes_billedbyuser_emailis the standard who-is-spending report.Trap Reaching for Cloud Billing Reports to find which BigQuery query was expensive; Billing Reports attributes by service and SKU, but the per-query culprit lives in INFORMATION_SCHEMA.JOBS.
- Read the BigQuery query plan: each symptom names one fix
The query plan and execution details (Query Insights) break a query into stages reporting slot wait time, shuffle bytes, and records read versus written. High slot wait time means slot contention, a concurrency problem fixed by adding slots; large shuffle bytes mean a big join or data skew, fixed by denormalizing; records read far larger than the result means scanning too much, fixed by partitioning, clustering, or a tighter filter. The symptom in the plan picks the remedy.
- Adding slots does not shrink the bytes a query scans
Slots are processing capacity, so they speed up running a query but never change how many bytes a poorly-laid-out query must read. A single slow query is therefore usually a layout problem (no partition or clustering, a wide scan) rather than a slot shortage, and the fix is to reduce bytes scanned, not to buy capacity. Slots address concurrency and many-query contention, not one query's data volume.
Trap Buying more slots to fix one slow query whose plan shows a huge scan; capacity does not reduce bytes read, so the scan stays just as large.
- Streaming Dataflow is healthy when data freshness stays low
In the Dataflow job-metrics tab, data freshness is the gap between an element's event-time timestamp and when it is processed, and system latency is the current maximum seconds an element has been processing or waiting. Rising data freshness together with rising backlog seconds (the estimated time to drain the current backlog) is the classic can't-keep-up picture; check the autoscaling chart to see whether workers are scaling toward the target or have hit their ceiling.
Trap Reading high data freshness as stale source data; it measures how far behind processing is, so a rising value means the job cannot keep up, not that the input aged.
- Watch oldest_unacked_message_age for a Pub/Sub backlog
A slow or stuck subscriber shows up as a growing Pub/Sub subscription backlog, and the
subscription/oldest_unacked_message_agemetric reports how stale the oldest unacknowledged message is. Watching it tells you the source side is falling behind before the downstream pipeline visibly stalls, which complements the Dataflow data-freshness view of the processing side.- A quota blocks the request; a budget only notifies
A quota is a hard limit: when a request would exceed it the system blocks the request and the operation fails, so quotas can actually prevent consumption. A Cloud Billing budget is the opposite, notification-only, and does not cap or stop spending; its default thresholds alert at 50%, 90%, and 100% of the amount you set against actual or forecasted cost. If you must stop runaway usage the lever is a quota; a budget just tells you it is happening.
Trap Setting a Cloud Billing budget to cap or halt spending; a budget only sends alerts and never stops usage, so spend continues past the threshold.
- A quota-exceeded error needs an increase, not a retry
A quota-exceeded error means a hard limit was reached, so retrying the same request keeps failing; the fix is to request a quota adjustment in Cloud Quotas, in most cases at the project level, and adjustment requests are subject to review with an email acknowledging receipt. This differs from a rate limit (a per-second or per-minute cap that smooths bursts), where client-side retry with exponential backoff is the correct response.
Trap Answering a hit absolute quota with retry-and-backoff; backoff handles transient rate limits, but an exhausted hard quota only clears with an increase request.
- Budget alerts can drive automation through Pub/Sub
Because a budget cannot stop spend on its own, route its alerts to a Pub/Sub topic so a subscriber (for example a Cloud Function) can take an automated response such as disabling billing on a project. The budget still only notifies; the Pub/Sub-triggered code is what actually acts, which is the supported way to approximate a hard spending stop.
- Attribute spend with Cloud Billing Reports by service and SKU
When a budget warns that cost rose, Cloud Billing Reports is the built-in visualization that breaks spend down by project, service, SKU, location, label, and time, with forecasted as well as actual figures. It answers which service or SKU drove the spend, while a per-query cost answer for BigQuery comes from
INFORMATION_SCHEMA.JOBS, not from Billing Reports.- Watch BigQuery slot usage in the admin resource charts
When BigQuery runs on capacity (editions) pricing, queries draw slots from reservations, and the administrative resource charts show slot usage, job concurrency, and job execution over time. Use them to confirm whether queries are waiting on slots at the project level, which is the same slot-wait signal the per-query plan reports, viewed across the whole reservation.
- Cancel a runaway job now, then prioritize with reservations
The immediate operational action for a job consuming far more than expected is to cancel that specific BigQuery or Dataflow job. To prevent recurrence you route heavy batch and interactive queries into separate reservations so one workload does not starve the other, but sizing those reservations is capacity planning; here the in-flight fix is the cancel and the routing is the observe-and-act follow-up.
- A metrics scope views many projects from one pane
A Cloud Monitoring metrics scope lets one scoping project view metrics from many Google Cloud projects, and even AWS accounts, so you watch an entire data platform from a single dashboard rather than hopping per project. Pair it with alerting policies and notification channels (email, PagerDuty, Slack, Pub/Sub, the mobile app) to centralize both viewing and paging.
- Attribute Dataflow cost per team with additionalUserLabels and billing export
The additionalUserLabels pipeline option attaches labels (department, environment, business unit) to each Dataflow job; the labels flow into the Cloud Billing export to BigQuery, where you filter and aggregate cost by label. This needs no extra billing configuration and the labels also filter jobs in the Dataflow monitoring UI.
Trap Trying to attribute spend per job from the billing console alone, without first stamping jobs with additionalUserLabels.
3 questions test this
- Your company runs multiple Dataflow batch pipelines across several departments and needs to track costs at a departmental level. Finance…
- Your company runs multiple Dataflow batch pipelines across different business units. Management requires cost attribution reports that show…
- Your data engineering team manages over 200 Dataflow batch jobs across multiple business units. The finance department needs to track costs…
- Use INFORMATION_SCHEMA.JOBS_TIMELINE for per-second BigQuery slot analysis
JOBS_TIMELINE has one row per second of every job's execution, so it is the most granular view of slot usage: period_slot_ms shows slot-milliseconds consumed per job per second, and period_estimated_runnable_units greater than zero means the job wanted more slots than were available. The plain JOBS view only summarizes a job, not its second-by-second timeline.
Trap Querying INFORMATION_SCHEMA.JOBS for slot contention, which lacks the per-second timeline that JOBS_TIMELINE provides.
3 questions test this
- Your organization wants to proactively monitor BigQuery slot utilization across all projects and set up alerts when usage exceeds 90% of…
- Your organization uses BigQuery reservations for capacity-based pricing. A business analyst reports that their queries are running slower…
- You are troubleshooting slow query performance in BigQuery and suspect slot contention. You need to identify which jobs consumed the most…
- Alert on slow BigQuery with the query/execution_times metric at the 99th percentile
The native bigquery.googleapis.com/query/execution_times metric feeds a Cloud Monitoring alerting policy directly. Aggregate it at the 99th percentile so an alert fires when consistently slow queries cross a threshold while ignoring occasional outliers.
Trap Building a log-based metric from query logs to track latency, when execution_times is already an alertable native metric.
- Enable Dataproc OSS metrics with --metric-sources, billed and found under VM Instance
Default Dataproc cluster and job metrics are collected free. Custom open-source metrics (yarn, spark, hdfs, and more) require the --metric-sources flag at cluster creation and are billed, so use --metric-overrides to collect only the critical ones for important clusters. These custom metrics carry a custom.googleapis.com/ prefix and appear in Metrics Explorer under the VM Instance resource, not under Cloud Dataproc Cluster.
Trap Hunting for custom OSS metrics under the Cloud Dataproc Cluster resource, where only the standard dataproc.googleapis.com metrics live.
8 questions test this
- Your company is concerned about Cloud Monitoring costs for Dataproc clusters. You want to monitor cluster health effectively while…
- Your organization runs production Spark workloads on Dataproc clusters. The operations team needs to monitor YARN resource utilization and…
- Your organization wants to set up monitoring alerts for Dataproc jobs that run longer than expected. Jobs submitted through spark-submit…
- Your organization runs multiple Dataproc clusters across several projects. You need to enable comprehensive monitoring of cluster resource…
- Your Dataproc cluster running image version 2.0 is experiencing intermittent performance issues. You want to collect additional…
- Your data engineering team manages multiple Dataproc clusters running Spark and Hadoop workloads. You need to enable custom metric…
- You are troubleshooting a Dataproc cluster performance issue and need to view custom Spark and YARN metrics that were enabled during…
- Your data engineering team runs critical Spark workloads on Dataproc clusters and needs to monitor YARN resource utilization, Spark driver…
- Find Dataproc job and executor logs under the Cloud Dataproc Job resource
Jobs submitted through the Dataproc Jobs API write driver and YARN container logs to Cloud Logging under the Cloud Dataproc Job resource type; filter by job_id and select yarn-userlogs to read Spark executor output. Cluster-level events (agent, startup) live under the Cloud Dataproc Cluster resource instead.
Trap Looking for Spark executor logs under the Cloud Dataproc Cluster resource, where only cluster-level entries appear.
2 questions test this
- Grant the log sink's writer identity a write role on the destination
A Cloud Logging sink writes through a unique writer-identity service account that has no permissions by default. After creating the sink you must grant that identity the destination's write role: Pub/Sub Publisher on a topic, or Storage Object Creator on a bucket (least privilege for compliance). Without it the sink errors and entries never arrive.
Trap Granting broad project roles or your own account access, instead of giving the sink's own writer identity the destination write role.
- Alert on DAG and SLA failures by logging from callbacks and matching with a log-based policy
The Google-recommended Airflow alerting pattern is to write structured messages from on_failure_callback (DAG-level for run failures, task-level via default_args for task failures) and sla_miss_callback, then create Cloud Monitoring log-based alerting policies that match those messages and route to channels like PagerDuty. The sla parameter is set on the task as a timedelta, but sla_miss_callback must be set at the DAG level, not in default_args.
Trap Putting sla_miss_callback in default_args or on the task, where Airflow never invokes it; only the DAG-level callback fires.
11 questions test this
- You are developing an Airflow DAG in Cloud Composer that processes hourly sales data. Business stakeholders require notification if the…
- You are configuring SLA monitoring for a Cloud Composer DAG that must complete within a specific timeframe. You need to be notified when…
- Your organization runs production data pipelines in Cloud Composer and needs comprehensive alerting for DAG failures and SLA misses. The…
- A data engineer is configuring failure notifications for a Cloud Composer DAG using callbacks. The callbacks need to log messages that…
- Your data engineering team uses Cloud Composer to orchestrate ETL pipelines. You want to receive notifications when any task within a…
- Your Cloud Composer environment runs data pipeline DAGs that process critical business data. You need to implement alerting to notify your…
- A data engineer is implementing failure notification callbacks for a Cloud Composer DAG. They want to send different notifications…
- Your organization uses Cloud Composer in production and wants to implement a robust alerting system for DAG failures and SLA misses. The…
- You are developing an Airflow DAG in Cloud Composer that must notify your team via Slack when individual tasks fail but should send an…
- Your data engineering team runs time-sensitive ETL jobs on Cloud Composer. Management requires alerts when tasks exceed their expected…
- Your team manages critical ETL pipelines running on Cloud Composer. You need to implement alerting so that operations staff receive…
- Stop Composer overeager scaling by raising minimum workers and worker_concurrency
When many short tasks finish on existing workers before freshly autoscaled workers warm up, the new workers sit idle and waste money. Raise the minimum worker count and tune [celery]worker_concurrency so existing workers absorb the queue instead of triggering new workers; a persistently high queued-task count with the environment pinned at its worker maximum instead means too little capacity, so raise the maximum workers.
Trap Lowering the maximum worker count to curb idle workers, which starves real bursts of capacity rather than fixing warm-up lag.
- Composer tasks failing with no logs and SIGTERM mean worker OOM
Tasks marked Failed with no logs, alongside 'Warm shutdown' and 'Received SIGTERM' in worker logs, indicate the worker pod was evicted for exceeding memory (logs were buffered and lost). Give workers more memory, or reduce [celery]worker_concurrency so each task has more memory and raise maximum workers to keep throughput.
Trap Treating logless task failures as code bugs, when SIGTERM and warm-shutdown messages point to a memory-evicted worker.
- When Dataflow won't scale up despite backlog, read the autoscaling rationale and check quota
The Autoscaling rationale chart explains why the autoscaler scaled up, down, or held steady; for Streaming Engine, downscaling targets 75% CPU and is disabled when that can't be met. If workers are below maxNumWorkers with a growing backlog, the usual cause is hitting Compute Engine CPU or external-IP quota; if already at the maximum, raise maxNumWorkers with an in-flight update.
Trap Assuming a stalled scale-up is a code bottleneck, when the rationale chart and project quotas usually reveal the real cause.
- Rising data freshness with normal backlog points to stuck work, not the source
When streaming data freshness climbs but backlog bytes stay normal, work items are stuck inside the pipeline rather than arriving too fast. Check the Parallel processing chart and processing_parallelism_keys for insufficient key parallelism (especially when CPU is low and even across workers), and scan worker logs for elements failing and retrying repeatedly, which holds the watermark back without a bottleneck alert.
Trap Scaling up workers when freshness rises with normal backlog, when the cause is stuck keys or retry loops, not throughput.
Also tested in
References
- https://docs.cloud.google.com/logging/docs/logs-based-metrics
- https://docs.cloud.google.com/bigquery/docs/admin-resource-charts
- https://docs.cloud.google.com/monitoring/docs/monitoring-overview
- https://docs.cloud.google.com/logging/docs/overview
- https://docs.cloud.google.com/error-reporting/docs/grouping-errors
- https://sre.google/sre-book/monitoring-distributed-systems/
- https://docs.cloud.google.com/bigquery/docs/information-schema-jobs
- https://docs.cloud.google.com/bigquery/docs/query-insights
- https://docs.cloud.google.com/dataflow/docs/guides/using-monitoring-intf
- https://docs.cloud.google.com/composer/docs/concepts/overview
- https://docs.cloud.google.com/bigquery/docs/reservations-intro
- https://docs.cloud.google.com/docs/quotas/overview
- https://docs.cloud.google.com/billing/docs/how-to/budgets
- https://docs.cloud.google.com/billing/docs/how-to/reports
- https://docs.cloud.google.com/docs/quotas/view-manage