WAP · Diagnostic Analysis

Not just finding the problem
explaining why

A competent monitoring system tells you "CPU is high." A competent diagnostic system also tells you why it's high and what to do about it. This post breaks down the logic behind WAP's diagnostic analysis — from cross-referencing multiple signals, to ranking root causes, to handing you a recommendation you can act on immediately.

Slow Query Log
Execution Plan
Resource Metrics
Config Change History
Similar Past Cases
CONFIDENCE 87%

Root cause: disk I/O bottleneck delaying oplog application

Suggestion: check this node's disk queue depth, or temporarily lower its read traffic weight

01 · Where Diagnosis Starts

There's never just one kind of signal that triggers a diagnosis

Diagnosis can be triggered from a lot of different entry points — a slow query crossing its threshold, an unusual resource swing, an alert breaching its limit. Whichever door it comes through, WAP kicks off the same analysis pipeline: never satisfied with just "what happened," always pushing on to "what does this actually mean."

Slow Query Over Threshold

A single query or a batch exceeding the latency threshold is the most common diagnostic trigger.

Resource Metric Anomaly

CPU, memory, or disk I/O suddenly deviating from its historical baseline.

Alert Threshold Crossed

Any monitoring metric that trips an alert threshold automatically comes with a diagnosis attached.

Sudden Replication Lag

Oplog lag climbing sharply in a short window is often the surface symptom of something deeper.

02 · Cross-Referencing

One signal can't explain a problem. A few together can.

A single slow query, on its own, tells you almost nothing about whether the root cause is a missing index, lock contention, or a disk bottleneck. WAP's diagnostic analysis pulls signals from multiple dimensions at once and only reaches a conclusion after cross-referencing them — here's exactly what each signal contributes.

01
Slow Query Log

Records exactly which query, how long it took, and how many documents it scanned — the "scene of the incident."

02
Execution Plan

Reveals whether the query actually ran as a collection scan or an index scan, and whether it hit the expected index.

03
Resource Metrics

Whether CPU, memory, or disk I/O also spiked in the same window — separating "the query itself" from "not enough resources."

04
Config Change History

Whether a parameter, version, or index was recently touched — a lot of root causes trace back to "someone changed this yesterday."

05
Similar Past Cases

Whether this same pattern has happened before, and what the root cause and fix were that time.

03 · Ranking Root Causes

Not a list of possibilities — a ranked priority

Multiple signals often point toward more than one plausible cause. WAP doesn't hand you a "suspect list" and walk away — it ranks causes by how strongly the signals actually correlate, putting the one most worth checking first at the top.

Confidence isn't a number pulled out of thin air: whether signals appeared in sync, whether this same pattern has historically led to the same outcome, and whether other obviously unrelated factors can be ruled out — all of that gets weighed in.

Disk I/O BottleneckI/O utilization hit 92% in the same window
87%
Long-Running TransactionNo abnormally long transactions found
41%
Network JitterHeartbeat latency within normal range
12%
04 · An Actionable Fix

Diagnosis ends with something you can actually do

Finding the root cause is only half the job. WAP's diagnostic analysis always lands on a specific, actionable recommendation — not a pile of correlated data dumped on you to figure out yourself.

[SIGNAL] Slow query detected: shard02 replication lag hit 128ms, over the 100ms threshold
[CORRELATED] Disk I/O utilization on this node rose to 92% in the same window
[CORRELATED] No config changes or abnormal long transactions in the last 30 minutes
[ROOT CAUSE] Disk I/O bottleneck delaying oplog application (confidence 87%)
[SUGGEST]
Check this node's disk queue depth, or temporarily lower its read traffic weight to relieve pressure.
05 · Common Diagnostic Scenarios

The same pipeline covers a wide range of "whys"

Cross-referencing signals, ranking root causes, handing over a fix — this pipeline wasn't built for one specific failure mode. It's general-purpose logic. Here are a few of the scenarios it handles most often.

Slow Queries

Typical cause: a missing index, or a compound index in the wrong field order

Lock Waits

Typical cause: a long-running transaction holding a lock, blocking everything behind it

Connection Exhaustion

Typical cause: connection pool sized too small, or clients not releasing connections properly

Replication Lag

Typical cause: a disk I/O bottleneck, or a network partition between nodes

Memory Pressure

Typical cause: the working set has outgrown available cache, hit rate falling sharply

Shard Hotspots

Typical cause: a poorly chosen shard key concentrating writes onto a single shard

Ready?

One less step of "figuring it out"
one more step of "just doing it"

From cross-referencing signals to a recommendation you can act on — the whole point of WAP's diagnostic analysis is shrinking the distance between spotting a problem and actually fixing it.