Situation: At 03:00 a metric for Region X drops to zero. My goal is to determine whether this is instrumentation/pipeline failure or real user behavior change.Immediate checklist (first 10–30 minutes)- Confirm alert, note exact timestamp, metric definition, and owners (data infra, product).- Snapshot dashboard and raw query results for rollback/forensics.Diagnostics steps (ordered, with artifacts to check)1) Check raw event ingestion- Query raw event table (events_raw / kafka_topic / s3 logs) for Region X around 02:30–03:30.- Example SQL:sql
SELECT event_type, COUNT(*) FROM events_raw
WHERE region='X' AND ts >= '2025-12-06 02:00' AND ts < '2025-12-06 04:00'
GROUP BY event_type;
- If raw events = 0 → upstream collection/SDK/edge issue.2) Compare staged vs aggregated- Check staging/validated table (events_validated) and the aggregation table (daily_metrics_region).- Run rollup query to reproduce aggregated metric from raw data:sql
SELECT region, date_trunc('hour', ts) as hour, COUNT(*) as cnt
FROM events_validated
WHERE region='X' AND ts BETWEEN ...
GROUP BY 1,2;
- If raw shows events but validated/aggregated = 0 → ETL validation or transformation bug.3) Inspect pipeline logs & monitoring- Check Kafka consumer/group offsets, connector logs, Airflow/DBT run history, job durations, error traces between 02:45–03:15.- Look for schema validation errors, null-pointer, commit failures.- Files/logs: Kafka metrics, S3 write logs, Airflow task logs, dbt run logs.4) Schema and deployment timeline- Review schema-change logs (schema_registry, git commits, db migration PRs) and deployment windows. Did any migrations, PRs, or config changes target 02:00–03:00?- Check CI/CD deploy history and team release calendar.5) Configs and experiments- Query feature flag / experiment service logs for Region X toggles:sql
SELECT flag, user_segment, changed_by, changed_at FROM feature_flags_audit
WHERE region='X' AND changed_at BETWEEN ...
- Check experiment assignments and targeting rules that could remove tracked events.6) Infra/ops signals- Check CDN, mobile crash rates, app versions in Region X, and network errors (4xx/5xx). High client errors + zero events → client-side outage.- Check user sessions: session_start counts vs metric counts.7) Reprocess and A/B sanity- Re-run aggregation on raw data for that hour locally. If re-aggregated metric >0, bug is in pipeline/aggregation; if re-aggregated =0 and raw events=0, likely real behavior or upstream outage.Ruling out false positives- Correlate with other metrics (e.g., pageviews, logins). If all drop → outage. If only this metric drops while other events remain → instrumentation for that metric (missing event emission or a change in event schema/key).Communicate and next steps- If instrumentation/pipeline: open incident with infra, attach queries, logs, and proposed rollback or reprocess plan.- If real behavior: prepare analysis of magnitude, affected cohorts, and notify product/stakeholders.- Always schedule a postmortem: root cause, monitoring gaps, alert threshold adjustments, and automated replay/reprocess capability.