SystemTutor
About
Sign in
Loading course documentation…
SystemTutor

COURSES

  • Data Structures & Algorithms
  • CSS MasterclassNew course
  • System DesignNew course

PRACTICE

  • Algorithm practice
  • CSS practice

LEGAL

  • Privacy Policy
  • Terms of Service
  • About

© 2026 SystemTutor. All rights reserved.

Built with 🫶 by Shatlyk

System design
Application FoundationsScaling and Traffic DistributionObservability and OperationsThe System Design Mindset From deployment to a profile request
Application architecture

Observability and Operations

Use logs, metrics, and traces to understand production behavior.

Lesson goal

Use metrics, a trace, and logs to investigate a slow profile request and decide when a responder needs an alert.

Before you begin — Scaling and Traffic Distribution.

A user reports that their profile took a long time to load. Was this an isolated request, or did many users experience the same delay? Observability lets you investigate questions about a running system through the signals it emits.

Start with the size of the problem

A metric is a numerical measurement. For a user-facing service, track request rate (how much traffic arrived), errors (how often requests failed), and duration (how long requests took). Together these are called the RED signals. Resource saturation, such as a busy disk with work waiting, helps investigate a possible cause.

Averages can hide a group of slow requests. The 95th percentile (p95) is the time at or below which roughly 95% of the observed requests finished. Compare the same operation over comparable time windows. If profile p95 rises while request volume is steady, the delay deserves investigation even when most users still get a fast response.

A request produces logs, metrics, and traces. A dashboard shows an error-rate spike and alerts the on-call responder to investigate.

Follow a slow profile request

A trace records the path of one request. Each timed operation in that path is a span. In one example trace, the profile request takes 240 ms from start to finish. A database read inside that request takes 180 ms, consuming three quarters of its elapsed time. The read is included in the 240 ms total. Adding the two numbers would count that time twice. OpenTelemetry's guide to traces and spans

A database read takes 180 ms inside a 240 ms profile request. The full time includes the database work.

A log records an event at a particular time. Structured fields such as the operation, timestamp, and trace ID let you find events for the database read. Use that trace ID to examine what happened in this request. Compare it with other slow requests before attributing the service-wide p95 increase to the database.

Decide when to alert

An alert should tell a responder which user operation needs attention. Sustained slow profile loads can justify a page if they cross the service's agreed threshold. CPU and disk metrics can help the responder investigate. A runbook records how to check impact, what action is available, and how to verify recovery.

Check your understanding

You have one slow trace with a long database span. What would tell you whether other profile users are affected, and what would help explain this particular database call?

Compare your reasoning

Check profile latency and error metrics over the incident window to establish impact. Follow the trace ID into the logs for details of that call. The same span appearing across many slow traces would strengthen the case for investigating the database path.

Key Takeaways

  • Metrics show the extent of a symptom over time.
  • Traces show where a particular request spent its time. Logs record the events that happened along the way.
  • Alert on a user-facing symptom that a responder can investigate and act on.

How is this lesson?

Previous lessonScaling and Traffic DistributionNext lessonThe System Design Mindset
Edit on GitHubReport on GitHub
On this page
%

On this page

Start with the size of the problemFollow a slow profile requestDecide when to alertCheck your understandingKey Takeaways