Skip to content
All work

Case study 20 / 25Data Viz

Privacy-first production observability for an on-premises platform

Administrators now see a new session in 1–4 s instead of 60 s, and long-range history answers 11 of 11 requests instead of 3.

My roleDesigned it and led a team of up to 3: set its standards, mentored it, agreed the roadmap with operations and the client, presented to leadership.

Stack

  • TypeScript
  • React
  • Next.js
  • MongoDB
  • InfluxDB
  • SVG
  • Headless Chrome

01 · How it works

  • TodaytoChanged in this work
  • Data flow

What it does

An admin-only page in the monitoring platform's web client, on the production site, that shows how the system runs and how people use it. Health tracks 22 thresholded KPIs across services, data paths, events and restarts; Usage follows screens, drop-off and the time from an alarm to a decision.

Read more

Privacy was a design constraint: the page answers 404 to anyone but administrators and shows names only to the super administrator.

6 connections· select a part to trace it
  1. Web client to API auth check: data polls every 1–4 s
  2. API auth check to In-memory session list: records every requestchanged
  3. In-memory session list to Health and usage page: sessions seen in 2.5 min
  4. Web client to Usage allowlist: batched usage events
  5. Usage allowlist to Usage event store: keeps listed fields only
  6. Usage event store to Health and usage page: reads 1 h to 180 d

02Results

  • R01Higher is better

    History requests answered on a 24 h or 7 d view (of 11)

    Before 3, after 11, 3.7× higher. Higher is better.
    Before
    After
  • R02Lower is better

    Usage panels with overlapping or clipped labels (of 16)

    Before 9, after 0, eliminated. Lower is better.
    Before
    After
  • R03Lower is better

    Main-thread time with the page idle, per 30 s

    Before 5.5 s, after 0.19 s, 29× lower. Lower is better.
    Before
    After

What it achieved

  • Who is using the production site, as administrators see it: a count one error could zero for an hour → derived server-side from every request the API already authenticates
  • Long-range history: 3 of 11 requests answered → 11 of 11
Read more
  • Usage panels: 9 of 16 with clipped labels → 0 of 16, guarded by a headless layout check
  • Idle cost: 5.5 s → 0.19 s of main-thread time per 30 s
  • A new session visible to administrators: after 60 s → within 1–4 s

03Decisions and trade-offs

  1. Constraint

    Usage analytics had to stay on-site, on a server that runs no extra services.

    Decision

    Build a usage SDK under 5 KB that only queues events.

    What it cost

    No off-the-shelf dashboards: I rejected a self-hosted stack needing four new services and hosted analytics.

  2. Constraint

    The console shows how people use the production site.

    Decision

    Answer 404 to anyone but administrators, and show names only to the super administrator.

    What it cost

    Other administrators see usage without names.

  3. Constraint

    9 of 16 usage panels had clipped or overlapping labels.

    Decision

    One truncating component for every label, and a harness that fails on any overlap across 54 layouts.

    What it cost

    Long labels are cut short by design, never clipped at random.

The challenge

An observability layer must cost less and be more reliable than the system it observes. The first build was neither: idle, it spent a sixth of its time on the main thread repainting status lights, the map and every cell.

Long-range views fired eleven history requests into a rate limit that admitted three, with no retry.

Read more

In production the session count read zero with a tab open, because a single 404 had silenced the browser heartbeat for an hour. Restarts left no record, the time-series store never expired data, and more than half the usage panels had clipped or overlapping labels.

What I learned

Measure what a monitoring page costs before adding to it: idle animation, not data, was the main expense. An observability layer must cost less and be more reliable than the system it observes, so the session count moved to the server, where one failed request cannot silence it.

Read more

Privacy shaped the architecture as much as performance did: recording only queues events and never re-renders the page.

Stack

  • TypeScript
  • React
  • Next.js
  • MongoDB
  • InfluxDB
  • SVG
  • Headless Chrome

Skills

  • Observability design
  • Privacy by design
  • Performance budgets
  • Data visualization
  • Automated visual testing
Cover picture for Privacy-first production observability for an on-premises platformCover picture for Privacy-first production observability for an on-premises platform