CourseModel Context Protocol · Module 9: Production and Ecosystem · part 62 of 83
Part 62 · Module 9: Production and Ecosystem

Topic 5: Observability

12 min read·22 Sept 2026

Tracing a question end to end

A trace is the story of one request across every process it touches, made of spans: timed operations with a name, attributes, and a parent. The trace id is shared by every span in the story; each span's parent id says what called it. OpenTelemetry (OTel) is the open standard for producing them, and the W3C traceparent header (or field) is how a trace id crosses a process boundary.

The MCP Python SDK is already instrumented. Every inbound message becomes a SERVER span such as tools/call search_notes, every outbound request a CLIENT span such as MCP send tools/call search_notes, and the client puts traceparent into the request's _meta so the server span joins the client's trace. The 2026-07-28 specification documents those _meta keys (traceparent, tracestate, baggage) from SEP-414. All of it is a no-op until you install the OTel SDK and an exporter, which is what the setup step did.

The example traces one host question through the server into a downstream HTTP API. Everything runs in one process so that one in-memory exporter sees all spans; in production each process exports to the same collector and the trace ids join them.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.