5. See it in Grafana
Everything is running: the stack, the traced API, and the instrumented page. Now use the shop like a visitor who has a bad day, and find each part of that visit in Grafana.
Step 7. See the full picture
Section titled “Step 7. See the full picture”On http://localhost:5173, click Add twice, Checkout, Call broken API, then Throw error. Wait up to a minute.
session.startnavigationlocalhost:5173GET /api/productsweb_vitalWeb Vitals of the pagecart.addedcustom eventcart.addedcustom eventPOST /api/checkoutGET /api/failhttp.request.failed500 GET /api/failexceptionButton exploded, uncaughtOne trace across both apps
Section titled “One trace across both apps”Explore → Tempo → TraceQL:
{ resource.service.name = "tiny-shop-backend" && name = "charge card" }Open the newest trace. Its root is now the browser:
- tiny-shop-frontend
POSTfetch span, @ouo11y/browser192 ms - tiny-shop-backend
POST /api/checkoutHTTP server span · session.id, user.id from baggage158 ms middleware - corsMiddleware1 msmiddleware - jsonParser2 msrequest handler - /api/checkout1 mscheckout152 msvalidate cart31 mscharge card121 ms
Click any backend span: session.id and user.id are on it, copied from the browser’s baggage by the BaggageSpanProcessor. That is how you go from a backend span to the session of the person who caused it.
Browser events
Section titled “Browser events”Explore → Loki:
{service_name="tiny-shop-frontend"}You see session.start, navigation, cart.added, http.request.failed (the 500), exception (the thrown error) and web_vital records, each with session_id. Each is an OpenTelemetry log record with an event.name; Loki shows the attribute session.id as session_id.
The session
Section titled “The session”More apps → ouo11y RUM → Sessions.
What you should see
Section titled “What you should see”Your session is crashed (the uncaught error), with its traces and a replay of what you clicked: the same visit you just found piece by piece in Tempo and Loki, in one place.
A session’s status is the worst thing that happened in it: an uncaught exception makes it crashed, a failed request or a handled exception errored, nothing at all healthy. See Sessions and health.
You are done. The last page stops the stack and lists what to check when something does not work.