Part 8 of 8 · 2 min read
Exercises
Easy
Easy 1: Monitoring or observability (20 minutes)
Sort six tasks into monitoring or observability: alert on error budget, find why one request failed, chart p99, follow a request across services, page the on-call, read logs of a crash.
Done when: a six-row table.
Hint
Symptom finding is monitoring; cause finding is observability.
Easy 2: Design an event (20 minutes)
Write a JSON log event for a "place order" request with at least eight fields from the list in section 3.
Done when: one valid-looking event with no sensitive data.
Hint
Include request id, who, what, status and timings.
Easy 3: Volume arithmetic (20 minutes)
A service handles 2,000 requests per second with 2 KB events. Compute gigabytes per day for full logging.
Done when: one number with the working.
Hint
2,000 × 2 KB × 86,400.
Medium
Medium 1: Sample it (30 minutes)
Using the numbers above, keep all 1 percent failures and 5 percent of successes. Compute events per second and gigabytes per day.
Done when: two numbers and the saving as a percentage.
Hint
Sampled events per second is 0.01 × 2,000 plus 0.05 × 1,980.
Medium 2: Join two services (30 minutes)
Write the log events of a gateway and a payment service for one failed order, sharing a request id. Show the join.
Done when: two events and one sentence giving the cause.
Hint
The same request id appears in both.
Medium 3: Read a trace (30 minutes)
A trace has a root span of 900 ms, three child spans of 100, 150 and 600 ms, and the 600 ms span has a child of 560 ms. Draw it and say where to look.
Done when: a drawn time line and a conclusion.
Hint
Subtract child time from parent time.
Hard
Hard 1: Instrument a flow (45 minutes)
For a sign-up flow through four services, define the trace id passing, the spans, and the log fields of each service.
Done when: a one-page design with a diagram.
Hint
The context must pass at every fork.
Hard 2: Logging budget (45 minutes)
A team's log bill doubled after a release. List causes from this page, how to find which applies, and a policy to stop it recurring.
Done when: a short plan with a measurable limit.
Hint
Check levels, new fields and loops that log.
Hard 3: Retrofit tracing (50 minutes)
A system has 12 services, 3 old frameworks and 2 third-party APIs. Plan how to add tracing in stages and what will stay invisible.
Done when: a staged plan with risks.
Hint
Start with the busiest path and use the service mesh where code cannot change.