Quickstart 1: Tiny Shop
You build a two-folder shop: an Express API and a React page. First they work with no telemetry at all. Then you start the ouo11y stack from one file, trace the API with the OpenTelemetry Node SDK, add @ouo11y/browser to the page, and break things on purpose. At the end, one click in the browser is one trace from the button to the API’s own spans, and Grafana shows a crashed session with that trace and a replay of what you clicked.
Time: about 30 minutes. You need: Node 24 or newer, Docker Desktop, VS Code, and pull access to the ouo11y images (see below).
What you build
Section titled “What you build”sessions, errors, replay
auto + manual spans
The page sends its own telemetry to the collector too (spans, events and replay chunks); the arrow above shows the call that ties the two apps together. Here is what happens when you click Checkout at the end of the quickstart. Press Play to step through it.
- 1 click Checkout · fetch span starts
- 2 OPTIONS /api/checkout · CORS preflight for traceparent, baggage
- 3 POST /api/checkout · traceparent + baggage(session.id)
- 4 manual spans · checkout, validate cart, charge card
- 5 200 { orderId }
- 6 server spans · OTLP /v1/traces
- 7 fetch span, cart.added, replay · :4318 and :4319
- 8 one trace, one session · Tempo, Loki, ouo11y RUM
The steps
Section titled “The steps”Each page ends with what you should see before you go on.
The finished files
Section titled “The finished files”Every file is on these pages, ready to copy. If you get stuck, compare with the finished backend/ and frontend/ folders, the ones you have at the end:
Short on time? Run the finished files
Section titled “Short on time? Run the finished files”-
Download and unzip the finished files above. You get a
tiny-shop/folder withbackend/andfrontend/. -
Start the stack as on page 2.
-
In
tiny-shop/backend:Terminal window npm installTerminal window npm startIt prints
[otel] tracing to http://localhost:4318/v1/tracesand serves on:5001. -
In
tiny-shop/frontend, in a second terminal:Terminal window npm installTerminal window npm run dev -
Open http://localhost:5173, click Add, Checkout, Call broken API and Throw error, then go to page 5.
What you should see at the end
Section titled “What you should see at the end”In Grafana, under More apps → ouo11y RUM → Sessions, one session with the status crashed. It has the trace of your checkout, from the browser’s POST span down to charge card in the API, and a replay of your clicks.