Monitoring & Alerting for Data Infrastructure (Prometheus, Grafana, OpenTelemetry)
Instrument data infra with Prometheus/Grafana and OpenTelemetry for metrics, logs, and traces.
In plain words
Low-cardinality metrics and stable resources. Next, oTel trace/span and run identifiers. Finally, sustained/burn-rate condition, owner, runbook, suppression.
Think of it like…
Metrics are dashboard gauges, logs are the maintenance journal, traces are the numbered journey through stations, and alerting is the mechanic who is paged only when a gauge predicts service failure.
Where you’ve seen it
A Spark/Flink job exports records_processed_total, queue/event age, checkpoint duration, and error counters with low-cardinality pipeline/region; OTel trace run_id links source fetch, warehouse MERGE, and publish API logs.
Words you’ll hear
- Prometheus
- A pull-oriented metrics model and query language for time-series samples, recording rules, and alert conditions.
- Grafana
- A visualization and alert frontend over metrics/logs/traces with dashboards and notification policies.
- OTel
- A vendor-neutral telemetry model and SDK/export protocol for traces, metrics, logs, and contextual attributes.
- Operational boundary
- High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred. Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression.
Visual diagram
Theory & deep dive
Prometheus: the working mechanism
Prometheus scrapes time-series metrics, Grafana visualizes and routes alerts, and OpenTelemetry standardizes traces, metrics, logs, and semantic resource/trace attributes for correlated infrastructure and pipeline views.
Low-cardinality metrics and stable resources. OTel trace/span and run identifiers, then per-SLO dashboard and pipeline dependency; this exposes the state governed by OTel.
A Spark/Flink job exports records_processed_total, queue/event age, checkpoint duration, and error counters with low-cardinality pipeline/region; OTel trace run_id links source fetch, warehouse MERGE, and publish API logs.
Monitoring & Alerting for Data Infrastructure: failure mode and production response
High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression. Track Cardinality as "bounded labels, never query/user IDs in Prometheus labels", and make Alert burn rate visible to the dataset owner.
How it works, step by step
Step 1 of 41. Instrument
Low-cardinality metrics and stable resources. Prometheus scrapes time-series metrics, Grafana visualizes and routes alerts, and OpenTelemetry standardizes traces, metrics, logs, and semantic resource/trace attributes for correlated infrastructure and pipeline views.
- Cardinality
- bounded labels, never query/user IDs in Prometheus labels
- Grafana
- A visualization and alert frontend over metrics/logs/traces with dashboards and notification policies.
When to use it & trade-offs
What it is
Prometheus scrapes time-series metrics, Grafana visualizes and routes alerts, and OpenTelemetry standardizes traces, metrics, logs, and semantic resource/trace attributes for correlated infrastructure and pipeline views. A Spark/Flink job exports records_processed_total, queue/event age, checkpoint duration, and error counters with low-cardinality pipeline/region; OTel trace run_id links source fetch, warehouse MERGE, and publish API logs.
Why it matters: High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred. Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression.
When to reach for it
- Instrument data infra with Prometheus/Grafana and OpenTelemetry for metrics, logs, and traces.
- Choose Prometheus because it provides this capability: A pull-oriented metrics model and query language for time-series samples, recording rules, and alert conditions.
- Keep evidence for Cardinality at "bounded labels, never query/user IDs in Prometheus labels" so the last production stage-Alert - sustained/burn-rate condition, owner, runbook, suppression-remains testable.
When to avoid or be careful
- High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
- Do not conflate Grafana with Prometheus. The second concept contributes different behavior: A visualization and alert frontend over metrics/logs/traces with dashboards and notification policies.
- Release only after this guardrail is in place: Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression.
Prometheus / Grafana / OTel - roles, limits, and operating cost
Strengths: A pull-oriented metrics model and query language for time-series samples, recording rules, and alert conditions. Prometheus scrapes time-series metrics, Grafana visualizes and routes alerts, and OpenTelemetry standardizes traces, metrics, logs, and semantic resource/trace attributes for correlated infrastructure and pipeline views.
Watch out: High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
Strengths: A visualization and alert frontend over metrics/logs/traces with dashboards and notification policies. In this workflow it supports: Visualize - per-SLO dashboard and pipeline dependency.
Watch out: The operating cost is real: SLO error budget consumption over fast/slow windows.
Strengths: A vendor-neutral telemetry model and SDK/export protocol for traces, metrics, logs, and contextual attributes. Its output can be checked with Trace coverage.
Watch out: Operating guardrail: Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for Prometheus, and how would Cardinality reveal it?”
- “Why is Grafana distinct from this behavior: a vendor-neutral telemetry model and SDK/export protocol for traces, metrics, logs, and contextual attributes?”
- Production clue: High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
- Design probe: Instrument RED/USE or data SLO metrics, keep label sets bounded, use trace IDs across logs/jobs, configure multi-window burn-rate or sustained alerts, and route actionable ownership with runbooks and maintenance suppression.
Benchmarks & rules of thumb
- Cardinality
- bounded labels, never query/user IDs in Prometheus labels
- Alert burn rate
- SLO error budget consumption over fast/slow windows
- Trace coverage
- critical pipeline hops emit linked spans or run IDs
Common mistakes & follow-ups
Common interview mistakes
- High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
- Reporting success from a job exit code without checking Cardinality and Alert burn rate.
- Treating this example as complete without replay, rollback, or access boundaries: A Spark/Flink job exports
records_processed_total, queue/event age, checkpoint duration, and error counters with low-cardinalitypipeline/region; OTel tracerun_idlinks source fetch, warehouse MERGE, and publish API logs.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: A pull-oriented metrics model and query language for time-series samples, recording rules, and alert conditions.
- What does the recovery plan do when this occurs? High-cardinality labels can bankrupt Prometheus storage, every batch warning can page an on-call engineer, and a trace ending at an uninstrumented worker hides where a late or failed data handoff occurred.
- When is Prometheus insufficient for Alert burn rate, and what does adding Grafana cost in Cardinality?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Monitoring & Alerting for Data Infrastructure (Prometheus, Grafana, OpenTelemetry) with data engineer interview Q&A and hands-on practice.