What to Measure in a Server
Track latency, errors, and tool usage.
What to Measure in a Server is a free MCP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Why Measure at All?
Once your MCP server runs in the wild, you cannot fix what you cannot see. Observability turns guesswork into clear signals about how it behaves. 🔍
The Three Pillars
Observability rests on three signals: logs, metrics, and traces. Today you focus on metrics, the numbers that summarize health at a glance.
Latency: How Slow?
The first thing to track is latency: how long each tool call takes from request to response. Slow tools frustrate the model and the user alike.
Don't Trust the Average
One slow call can hide behind a happy average. Watch percentiles like p95 and p99 so you catch the worst experiences your callers actually feel.
Error Rate: How Often Broken?
Track your error rate: the share of tool calls that fail. A rising rate is your earliest warning that something upstream just broke. ⚠️
Throughput: How Busy?
Count calls over time to see throughput. Knowing requests per minute tells you when load spikes and whether your server can keep up.
Per-Tool Usage
Break metrics down by tool name. Knowing which tool is hot, slow, or failing lets you fix the exact part that matters instead of guessing.
Counters vs Gauges
A counter only goes up, like total calls. A gauge moves both ways, like active sessions right now. Pick the type that fits the thing you measure.
A Simple Timer in Python
You can capture latency with nothing more than a timer around your tool body, then record the elapsed seconds.
import time
start = time.perf_counter()
result = do_work()
elapsed = time.perf_counter() - start
print("latency_seconds", elapsed)Label Your Metrics
Attach labels like tool name and status to every metric. Labels let you slice one number into the views that answer real questions.
Golden Signals
A handy checklist is the golden signals: latency, traffic, errors, and saturation. Cover these four and you see most problems before users do.
Quick Check
Let us make sure the latency idea stuck.
Recap
You now know what to measure: latency, errors, throughput, and per-tool usage. These numbers turn a silent server into one you can actually trust. 🎯
Frequently asked questions
Is the “What to Measure in a Server” lesson free?
Yes — the full text of “What to Measure in a Server” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.
What will I learn in “What to Measure in a Server”?
Track latency, errors, and tool usage. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start MCP Academy?
No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “What to Measure in a Server” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this MCP Academy lesson?
Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What to Measure in a Server
- Structured Logs You Can Search
- Trace a Tool Call End to End
- Alert on Failures & Abuse