Design Distributed Tracing Across Microsoft 365 Microservices

Last updated: November 29, 2026

Quick Overview

Design a tracing system that follows a single Outlook or Teams request across hundreds of backend services, collects spans with low overhead, and lets engineers find slow or failing traces quickly.

Microsoft
System Design
Software Engineer
Microsoft
November 29, 2026
Software Engineer
Onsite
System Design
Medium

0

0

0 solved


Design a tracing system that follows a single Outlook or Teams request across hundreds of backend services, collects spans with low overhead, and lets engineers find slow or failing traces quickly.

Large Microsoft services are built from many microservices, and engineers debug them with tracing (OpenTelemetry style). The interviewer checks context propagation, sampling strategy (head versus tail), storage of spans, and how to keep overhead and cost in check.

What the Interviewer Expects
  • Propagates trace context (trace id, span id, flags) in headers and message metadata
  • Uses SDK plus local collector agents to batch spans asynchronously
  • Compares head sampling with tail sampling and picks a hybrid
  • Stores spans by trace id and indexes searchable attributes
  • Links traces to logs and metrics
  • Keeps PII out of span attributes
Key Topics to Cover
Context propagation
Head and tail sampling
Span collection
Trace storage
Correlation with logs
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you guarantee you keep traces for the 0.1 percent of requests that errored if you only sample 1 percent?
  • How does context propagate through a queue to an async worker?
  • What does it cost to store every span and how do you reduce it?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Millions of requests per second across services in many regions. Each request produces 10 to 200 spans. Overhead on services under 1 to 2 percent CPU. Engineers search traces by service, operation, st...

High-Level Design

Instrumentation: SDKs create spans and propagate context via W3C traceparent headers across HTTP and RPC, and as message properties across queues. Spans are exported asynchronously to a **local ...


Submit Your Answer
Markdown supported

Related Questions