ErrTapDocs

Performance & Web Vitals

Measure Core Web Vitals (LCP, INP, CLS) plus FCP and TTFB from real visitors with the ErrTap browser SDK, and find the slowest pages on the Performance page.

The Performance page shows how fast your site feels to real visitors. The browser SDK measures Core Web Vitals on every page view and ErrTap reports the 75th percentile (p75) per metric and per page, the same way Google rates a site.

Turn it on

Web Vitals are on by default in @errtap/browser 0.5.0+ and @errtap/next 0.5.2+. Nothing else is needed after init:

import { init } from '@errtap/browser'; // or '@errtap/next/client'

init({
  dsn: 'https://et_<key>@<host>/<project>',
  environment: 'production',
  // vitals: false,         // turn reporting off
  // vitalsSampleRate: 0.1, // report from 10% of page views
});
OptionTypeDefaultDescription
vitalsbooleantrueReport Web Vitals once per page view
vitalsSampleRatenumber1Fraction of page views (0 to 1) that report

Each report counts as one event toward your monthly quota, so use vitalsSampleRate on high-traffic sites. The sample decision is made once per page load.

What is measured

MetricWhat it measuresGoodPoor
LCP — Largest Contentful PaintWhen the main content has loaded≤ 2.5 s> 4 s
INP — Interaction to Next PaintHow quickly the page responds to clicks, taps and keys≤ 200 ms> 500 ms
CLS — Cumulative Layout ShiftHow much content jumps while loading≤ 0.1> 0.25
FCP — First Contentful PaintWhen anything first renders≤ 1.8 s> 3 s
TTFB — Time to First ByteServer and network response time≤ 800 ms> 1.8 s

Values between good and poor are rated needs improvement. LCP, INP and CLS are the three Core Web Vitals. A page passes when all three are good at p75, which is Google's own pass rule.

How reporting works

  • The SDK uses the browser's PerformanceObserver, with no extra dependency.
  • All metrics for a page view are sent in one request when the page is first hidden: the visitor switches tabs, navigates away or closes it.
  • The page URL is sent without its query string or hash. If PII scrubbing is on for the project, URLs are scrubbed like any other event.
  • A page view is one hard page load. Client-side route changes in single-page apps are reported as part of the landing page, not as separate views.
  • Browsers that don't support a metric simply don't report it.

The Performance page

  • Verdict: whether your site (or the selected page) passes Core Web Vitals, and which metrics fail.
  • Headline numbers per metric at p75, with their rating and a daily trend.
  • Pages, ranked worst first by their rating and how far the worst metric sits past good. Select a page to filter the headline numbers and trend to it.
  • Filters: environment, and a 7, 14 or 30-day window.

Web Vitals are kept for your plan's retention window, like other telemetry.

Improve what you find

Failing metricUsual causes
LCPSlow server response, render-blocking CSS or JS, large unoptimized hero images
INPLong JavaScript tasks on the main thread during interactions, heavy re-renders
CLSImages or ads without dimensions, late-loading fonts, content injected above existing content
TTFBUncached server rendering, slow database queries, distant hosting region

Pair the Performance page with Issues and Logs for the same release: a regression in LCP after a deploy often lines up with new errors or slow queries.

Send vitals without the SDK

Anything that measures vitals can post them to /ingest/vitals.