Telescope

PageSpeed

How Telescope monitors website performance using Google PageSpeed Insights (Lighthouse scores and Core Web Vitals).

PageSpeed monitors measure website performance by calling the Google PageSpeed Insights API v5, which runs a Lighthouse audit and returns category scores plus Core Web Vitals.

How a check works

  1. Telescope resolves the URL from the monitor's url field (validated via new URL()).
  2. For each configured strategy (mobile, desktop, or both), an API call is made to the PageSpeed Insights API v5.
  3. Strategies run sequentially with a 500ms delay between calls to avoid rate limiting.
  4. Each API response is parsed: Lighthouse category scores (0–1 floats → 0–100 integers) and Core Web Vitals audit metrics.
  5. When running both strategies, the worst (minimum) score per category is used for threshold comparison.
  6. The overall status is determined by comparing worst scores against configured thresholds.

Checks never hang — each API call uses AbortSignal.timeout() with a full 2-minute timeout per strategy (the strategies run sequentially, so the two-strategy worst case is ~4 minutes plus the inter-strategy delay). If a strategy fails, the check returns down with any partial results preserved.

Status classification

ConditionStatusWhat it means
All category scores >= thresholdsUpSite performance meets expectations
Any category score < thresholdDegradedSite is reachable but underperforming
API error, timeout, or network failureDownUnable to complete the audit
No URL configuredDownMonitor misconfigured

The degraded status (not down) is used for below-threshold scores because the site is still reachable — it's just slow or has quality issues.

Lighthouse categories

CategoryAPI keyWhat it measures
PerformanceperformanceLoading speed, interactivity, visual stability
AccessibilityaccessibilityScreen readers, ARIA, color contrast, keyboard navigation
Best Practicesbest-practicesHTTPS, no deprecated APIs, correct image aspect ratios
SEOseoMeta tags, crawlability, structured data

Scores are 0–100, converted from the API's 0–1 float format (e.g. 0.93493).

Core Web Vitals

MetricAudit IDUnitGoodNeeds ImprovementPoor
First Contentful Paint (FCP)first-contentful-paintms≤ 1,8001,800–3,000> 3,000
Largest Contentful Paint (LCP)largest-contentful-paintms≤ 2,5002,500–4,000> 4,000
Total Blocking Time (TBT)total-blocking-timems≤ 200200–600> 600
Cumulative Layout Shift (CLS)cumulative-layout-shiftunitless≤ 0.10.1–0.25> 0.25
Speed Index (SI)speed-indexms≤ 3,4003,400–5,800> 5,800
Time to Interactive (TTI)interactivems≤ 3,8003,800–7,300> 7,300

CLS is stored with 3 decimal places. All other metrics are in milliseconds. Missing audits are stored as null.

Configuration options

SettingDefaultDescription
StrategyBoth (mobile + desktop)Which strategies to run: mobile, desktop, or both
Min Performance Score50Minimum acceptable performance score (0–100)
Min Accessibility Score50Minimum acceptable accessibility score (0–100)
Min Best Practices Score50Minimum acceptable best practices score (0–100)
Min SEO Score50Minimum acceptable SEO score (0–100)
Per-strategy timeout2 minutesFixed timeout per API call — each strategy gets a full 2 minutes

API key

The PageSpeed Insights API works without an API key but has lower rate limits (roughly 25 requests/100 seconds per IP). To increase limits:

  1. Create a Google Cloud project and enable the PageSpeed Insights API.
  2. Generate an API key in the Google Cloud Console.
  3. Set the GOOGLE_API_KEY environment variable on the worker.

With an API key, the limit increases to roughly 400 requests/100 seconds.

On this page