Desktop Only
These koans require a larger screen. Please visit on a desktop browser.
Koan 11 of 19

Silent Code

The code runs. It works.
But it says nothing about how it works.
Someone must teach it to speak.
This function handles checkout in production. A customer reports their checkout took 30 seconds. You look for data—timing, order details, anything—but there is none. The code works, but it tells you nothing.
checkout.js
function checkout(order) {
  let total = calculateTotal(order)
  chargePayment(order.user, total)
  updateInventory(order.items)
  return { status: "confirmed" }
}
telemetry output
nothing — the code is silent
span: checkout — started
span: checkout (order.id=8842)
metric: order.total = 49.99
span: checkout (order.id=8842) 142ms — complete
Choose lines to add
Click a line above to add it to the function.

You just made silent code emit structured telemetry. This act—adding code that makes a program produce telemetry—is called...

Instrumentation is the bridge between code and observability.

Without it, code runs in the dark. With it, every function can describe what it did, how long it took, and what it touched.

Continue →