Boss: See inside the game

Play this quiz

Pick the signal

Which signal shows the path one slow "Join garden" request took through every service, and the time spent in each?

  1. A trace
  2. A gauge
  3. A counter
Show the answer

A trace

A trace is made of spans, one per unit of work, all sharing one trace ID. Gauges and counters are metrics: totals across many requests.

Quick check

A log line written as valid JSON is always a structured log.

Show the answer

False

Structure comes from a stable schema: the same field names, types and meanings everywhere. JSON with garden_id in one place and gardenId in another is not structured.

Bug hunt

link-account.js
log.info('account.link', {  player_id: p.id,  token: s.accessToken });

Which line must go?

  1. Line 1
  2. Line 2
  3. Line 3
Show the answer

Line 3

Access tokens are on OWASP's list of things never to record directly in logs. Anyone reading the log could use the token. The event name and internal player ID are fine.

Quick check

Players waiting in a lobby go up and down all day. Which metric type fits?

  1. A gauge
  2. A counter
  3. A summary
Show the answer

A gauge

A gauge can go up and down. A counter may only go up, or reset to zero on restart.

Quick check

Why does Priya watch the p99 save time instead of the average?

  1. A few very slow saves barely move the average, but the p99 shows them
  2. The p99 is always smaller, so the graph looks better
  3. Averages can't be computed from a histogram
Show the answer

A few very slow saves barely move the average, but the p99 shows them

The SRE book warns that an average can stay flat while the slow tail gets much worse. The p99 is the time only 1 in 100 saves is slower than.

Quick check

Priya wants to keep every trace that contains an error. Which sampling can guarantee that?

  1. Tail sampling
  2. Head sampling at 1%
  3. Head sampling at 10%
Show the answer

Tail sampling

Head sampling decides when the trace starts, before any error has happened. Tail sampling decides after seeing the trace, so it can keep all the error traces.

Do the math

Shard Garden's join SLO is 99.9%. For the last hour, 1.44% of joins failed. What is the burn rate, and what does the SRE workbook's starting rule say?

  1. 14.4: page someone
  2. 1.44: open a ticket
  3. 144: ignore it, it is a short spike
Show the answer

14.4: page someone

1.44% divided by the 0.1% the SLO allows is 14.4. At that rate, 2% of a 30-day budget burns in one hour, which the workbook says is worth a page.

Release check

An obfuscated Android stack trace from Shard Garden 1.4.2 says "at a.b.a". What turns it back into real names?

  1. The retrace tool with the mapping.txt saved from the 1.4.2 build
  2. The dSYM file from the iPhone build
  3. The mapping.txt from today's build
Show the answer

The retrace tool with the mapping.txt saved from the 1.4.2 build

mapping.txt lists the old and new names for one build only, and it is overwritten on every build. That is why each release saves its own copy.