What you will learn in this TP
- Send a handled error with context
- Track a business event
- Find a session
All steps and instructions are shown. Recommended for this lab: semi-guided
Introduction #
Context. The conversion rate has been dropping since the last release. You want to know whether JavaScript errors are blocking the add-to-cart action.
Prerequisites: Previous lab completed · Estimated time: 35 min
Linking errors to business journeys.Setup #
Guided steps, with their solutions.
1. Handled error with context
Why? A handled error (try/catch) is not captured automatically: you must send it to see it.
Add a “Pay” button that throws an error inside atry/catchand sends it withpushErrorand some context.2. Identify the user
Why? A pseudonymous identifier lets you group the sessions of a single account without any personal data.
Once the page has loaded, callsetUserwith a technical identifier.3. Count errors and events
Why? The events/errors ratio gives a first picture of the journey's health.
Write the LogQL queries that count exceptions by message and add-to-cart events over 15 min.4. Find a session
Why? In support, you often start from a user reporting a problem.
Copy asession_idfrom an exception line, then display the full timeline of that session.5. Change version
Why? Comparing two versions is the reflex after a deployment.
Setversionto1.1.0in the page, generate a few errors, then count exceptions byapp_version.
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Course Glossary
Core Web Vitals
Set of three metrics defined by Google to measure the real experience of a web page: loading (LCP (Largest Contentful Paint)), responsiveness (INP (In...
LCP (Largest Contentful Paint)
Time until the largest visible element of the page (image, video or text block) is rendered: it shows when the main content appears. Loading metric of...
INP (Interaction to Next Paint)
Latency of interactions (click, tap, key press) observed over the whole visit: the delay between the user's action and the next paint. The reported va...
CLS (Cumulative Layout Shift)
Measure of visual stability: the sum of unexpected layout shifts (a button moving just as you click, text pushed down by an ad). Unitless, computed ov...
FCP (First Contentful Paint)
Time until the first content (text, image, SVG) is rendered: the moment the user sees the page start loading. It is not a Core Web Vital, but it helps...
TTFB (Time to First Byte)
Time between the start of navigation and the arrival of the first byte of the response: it adds up redirects, DNS, TCP/TLS connection and server proce...
FID (First Input Delay)
Former responsiveness metric of the Core Web Vitals: the delay before the browser starts handling the first interaction (good ≤ 100 ms). It ignored la...
TBT (Total Blocking Time)
Lab metric (Lighthouse): the sum, between FCP (First Contentful Paint) and the end of loading, of the blocking part of each long task (over 50 ms) on ...
CrUX (Chrome UX Report)
Google's public dataset aggregating the Core Web Vitals measured from real Chrome users (at the 75th percentile, per origin and URL, over a rolling 28...
Lighthouse
Google's free audit tool, built into Chrome DevTools and PageSpeed Insights: it loads the page in a simulated environment and scores performance, acce...
Apdex
Application Performance Index: a satisfaction score between 0 and 1 based on a time threshold T. Requests under T are “satisfied”, between T and 4T “t...
Recommended Articles
Faro: JavaScript errors, logs, business events and sessions
Use the Faro API: automatic error capture, manual error reporting, logs, business events and meas...
Using Faro data: queries, dashboards, alerts and GDPR
Query Faro data in Loki (Web Vitals, errors, events), build dashboards and alerts, and comply wit...
Frontend Observability in Grafana Cloud
Frontend Observability in Grafana Cloud: RUM built on Grafana Faro. Web Vitals, JavaScript errors...
Business observability with Dynatrace: business events, KPIs and Business Flow
Link technical and business in Dynatrace: business events (bizevents) captured by OneAgent, API o...
Analyzing user experience in Dynatrace: sessions, traces, analysis and USQL
Use digital experience (DEM) data: Apdex and Core Web Vitals, user sessions, service flows, distr...
Conversion funnels in RUM: measuring where users drop off
Building and reading a conversion funnel with RUM data: steps, rates, order, pitfalls, and implem...
From click to database: front-end to back-end traces with Faro
Link browser requests to back-end traces: TracingInstrumentation, traceparent header propagation,...
Faro and Alloy: receiving front-end RUM with faro.receiver
Configure faro.receiver: CORS, API key, rate limiting, source maps, then send browser errors, Web...
Grafana Faro: architecture and installation
Install Grafana Faro: the web SDK (npm or CDN), Alloy's faro.receiver, sending to Loki and Tempo,...