MLOps & Data Engineering

Module 15 of 18

Module 15: Monitoring & Observability

5 min read879 words
What you'll learn
Explain why production systems need monitoringDistinguish system health from data/model healthDefine model drift and how to detect itDescribe alerting done well

"Shipping a model or pipeline is the start, not the finish. Monitoring is how you know it's still working — before your users tell you it isn't."

Level: Intermediate · Time: ~3 days · Prerequisites: Modules 13–14

Learning Objectives

By the end of this module, you will be able to:

  • Explain why production systems need monitoring
  • Distinguish system health from data/model health
  • Define model drift and how to detect it
  • Describe alerting done well

1. Why Monitor?

Software and models don't stay healthy on their own. Servers slow down, data sources change, and models decay as the world shifts. Monitoring continuously watches your systems so you catch problems early — ideally before anyone is harmed by them.

Concept: In production, the question isn't if something will break, but when. Monitoring turns "we found out from angry users a week later" into "we got an alert and fixed it in minutes."

2. Three Things to Watch

Production ML has layers of health, each needing eyes:

LayerWatch forExample
SystemSpeed, uptime, errorsAPI latency, crashes
DataQuality, freshness, schemaMissing fields, stale feed
ModelAccuracy, driftPredictions getting worse

Common mistake: Monitoring only the servers ("is it up?") and ignoring the model. A model can run perfectly fast while quietly making terrible predictions. Green server dashboards can hide a broken model.

This is the trap that catches teams new to ML in production. Traditional software mostly fails loudly — a server crashes, an error appears, the page won't load. ML fails quietly: the service stays up, responds fast, returns well-formed predictions, and those predictions are simply wrong. Every system dashboard can glow green while the model steadily loses money. That's why the data and model layers need their own eyes, not just the server layer.

3. Model Drift

A model is trained on past data, but the world moves on — customer behavior shifts, new products launch, trends change. Drift is when incoming data (or the relationships in it) diverges from training data, and accuracy silently degrades.

Explain like I'm new: It's like a map of a city that keeps growing. The map was accurate when drawn, but new roads appear and it slowly becomes wrong. Models "go stale" the same way — the fix is to notice and redraw (retrain).

4. Detecting Drift & Decay

Since real answers ("was this actually fraud?") often arrive late, teams watch proxy signals: shifts in the distribution of inputs, changes in prediction patterns, and — when true labels arrive — the real accuracy trend. A drift alert is the trigger to retrain (Module 14).

Why proxies? Because the truth is often slow. A loan-default model won't know if today's approvals were mistakes for months. So instead of waiting, teams watch the inputs: if the mix of applicants suddenly shifts (younger, higher-income, a new region), that distribution change is an early warning the model may be operating outside what it learned on — long before the real default numbers come in.

Try this: Imagine a spam filter trained last year. Spammers changed tactics since. What would tell you it's slipping before users complain — more spam getting through, or a shift in the kinds of emails it flags? Spotting those early signals is monitoring in action.

5. Alerting Without Crying Wolf

Good monitoring alerts a human when action is needed — and stays quiet otherwise. Too many false alarms and people ignore them (alert fatigue); too few and problems slip through. Set thresholds thoughtfully and route alerts to whoever can fix them.

A practical tactic for taming alerts is to route each type to the person who can act on it, and to set thresholds based on real impact rather than gut feeling. A 2% latency bump at 3 a.m. probably shouldn't wake anyone; a 40% accuracy drop should. Teams often start noisy and tune downward, muting alerts that never once required action and sharpening the ones that did.

Concept: Observability closes the MLOps loop: deploy → monitor → detect drift → retrain → deploy again. A production ML system is a cycle, not a one-time launch — and monitoring is what keeps the cycle turning.

✅ Checkpoint

  1. Why isn't monitoring only about "is the server up?"
  2. What is model drift?
  3. What makes alerting effective rather than annoying?

Answers: 1) A model can run fast yet make poor predictions — you must also monitor data and model health, not just system health. 2) When incoming data diverges from training data over time, silently degrading accuracy. 3) Alerting only when human action is needed, with well-set thresholds, avoiding false alarms (alert fatigue).

Key Takeaway: Production systems need monitoring across three layers — system (speed/uptime), data (quality/freshness), and model (accuracy/drift). Models decay as the world changes, so watch proxy signals and true accuracy to catch drift and trigger retraining. Good alerting notifies a human only when action is needed. Monitoring closes the deploy→detect→retrain loop.

Further Learning

Part of "MLOps & Data Engineering." Original content for this learning platform.