Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Monitoring and Observability  ›  Lesson

What to Monitor in an ML System

Monitoring & Observability 13 minAn ML service needs three layers of monitoring: system health, data quality of the inputs, and model quality, which often arrives late because true labels come later.

What to Monitor in an ML System

The churn API has been live for a month. It answers every request in 30 ms and has not crashed once. Every normal dashboard is green. Yet a broken upstream job has been sending days_since_last_login = 0 for half of all users, and the model has been calling them all loyal. A healthy server can serve a sick model.

The rule

Watch three layers: the service, the data going in, the predictions coming out.

1. System health — the same as any web service:

  • Latency (especially the slow tail, such as the 95th percentile).
  • Error rate and throughput.
  • CPU, memory, and for some models GPU usage.

2. Data quality — the inputs the model receives:

  • Missing values per feature (days_since_last_login suddenly 50% zero or null).
  • Schema changes (a new category, a column renamed upstream).
  • Distribution shift compared with training (the average skips_per_week doubling).

3. Model quality — the outputs and, eventually, their correctness:

  • The prediction distribution: what share of users is flagged as likely to churn each day.
  • Real performance such as recall, once true labels are known.

The catch in layer 3 is delayed labels. Whether a user churned is only known 30 days after the prediction. For a month, recall is simply unavailable. So layers 2 and the prediction distribution in layer 3 act as early warnings: if inputs or outputs suddenly look unlike training, investigate now rather than waiting a month for recall to confirm it.

The shortcut

For each layer ask "What would this look like if it broke?" and turn the answer into a signal with a threshold.

The churn API's watch listStep 1 of 4
  1. Service broke?

    Slow or failing requests. Alert when p95 latency exceeds 200 ms or errors exceed 1% for 10 minutes.

The trap is stopping after layer 1. System dashboards were built for code that fails loudly. Models fail quietly, with fast, confident, wrong answers.

Drills

Answer fast — trust the rule.

quick drill

The API is fast and error-free, but half the inputs have days_since_last_login = 0. Which layer catches this?

quick drill

Why can't you rely on recall alone in the first month after release?

quick drill

The share of users flagged as likely churners jumps from 8% to 30% overnight. What is the right reaction?

quick drill

Which is a system-health signal rather than a model signal?

Remember

  • Watch three layers: the service, the data going in, the predictions coming out.
  • For each layer ask what breaking would look like, then alert on it.
  • Trap: green system dashboards hiding a model that is quietly wrong.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainBuild the watch list

Write the monitoring plan for the churn API: one or two signals for each of the three layers, and explain why you cannot rely on accuracy alone during the first month.