Skip to content

RUM (Real User Monitoring)

Real User Monitoring captures performance and interaction data from your real users’ browsers. Unlike browser checks (synthetic, runs from one IP), RUM measures the actual experience: every user, every device, every network condition.

  • Track user-perceived performance (web vitals: LCP, FCP, CLS, INP, TTFB).
  • Catch JS errors your test suite missed.
  • Understand real user flows (which pages, which buttons, in what order).
  • Identify slow regions, slow devices, slow ISPs.
  • For “is the site up?” — that’s a browser check or HTTP check.
  • For backend performance — use traces.
  • For a single canary value — RUM is statistical (millions of points), not deterministic.

You install the @siteqwality/rum SDK in your front-end. It:

  1. Generates a session ID per user/visit.
  2. Subscribes to PerformanceObserver for web vitals.
  3. Listens for errors (window.onerror, unhandledrejection).
  4. Tracks click and view events.
  5. Periodically posts batched events to https://rum.siteqwality.com.

The SDK is two layers:

  • Always-on collection of light measurements (web vitals, view counts, error counts) — sent on every session.
  • Detail collection (resource timings, individual error stacks, click targets) — activated only when a session filter matches the session. Keeps cost down by not capturing every detail for every user.

Session replay is the third tier: pixel playback, activated only by replay-enabled session filters. See its own page.

Each install of the SDK targets a RUM application — typically one per domain or one per major build. Each app has:

  • A unique application_id and a public client_token.
  • A domain for the dashboard’s “Open in app” links.
  • Privacy settings (mask_inputs, mask_text).
  • Session filters that activate detail/replay capture.

Create one in RUM → New application.

Two install paths:

Terminal window
npm install @siteqwality/rum
import { SiteQwalityRUM } from '@siteqwality/rum';
await SiteQwalityRUM.init({
applicationId: 'abc123',
clientToken: 'pub_def456',
service: 'web',
version: '1.4.2',
env: 'prod',
});

For static sites, drop in a script tag:

<script type="module" src="https://cdn.siteqwality.com/rum/v1/sdk.min.js"></script>
<script type="module">
await SiteQwalityRUM.init({
applicationId: 'abc123',
clientToken: 'pub_def456',
service: 'web',
env: 'prod',
});
</script>

The CDN bundle code-splits — rrweb (replay engine) is loaded only when a replay-enabled filter activates, so it’s free for users not being replayed.

// Identify a user (call after login)
SiteQwalityRUM.setUser({ id: 'usr_abc', email: 'alice@example.com', name: 'Alice' });
// Custom error
SiteQwalityRUM.addError(new Error('Payment dialog refused'), { feature: 'checkout' });
// Custom action
SiteQwalityRUM.addAction('checkout_step_2', { variant: 'A' });
Always-onDetail (filter-activated)Replay (replay-enabled filter)
View counts, page loadsResource timings (every fetch/XHR)Full DOM snapshots + mutations
Web vitals (LCP, FCP, CLS, TTFB, INP)Individual errors with stack tracesMouse/keyboard input events
Aggregate error countClick/keypress events with targetNetwork requests captured visually
Aggregate action countLong tasks (>50ms blocking)(privacy: optional input/text masking)
Session start/endDistributed-trace IDs from outgoing fetches

The SDK respects two privacy toggles set on the RUM application:

  • mask_inputs — replace input values with *** before sending.
  • mask_text — replace user-visible text with *** (for replay only).

Set these conservatively if you handle PII or financial data. See replay privacy.