Skip to content

Add instrumentation-dashboard example (Meteor 3.6) - #53

Open
dupontbertrand wants to merge 1 commit into
meteor:mainfrom
dupontbertrand:instrumentation-dashboard
Open

dupontbertrand wants to merge 1 commit into
meteor:mainfrom
dupontbertrand:instrumentation-dashboard

Conversation

@dupontbertrand

Copy link
Copy Markdown

This pull request was written and opened by Claude Code, after review by the author.

Adds instrumentation-dashboard, an admin dashboard built on the instrumentation package that ships with Meteor 3.6 (meteor/meteor#14483). A small task app produces real traffic, and /admin shows method calls, p95 latency, error rate and DDP connections, a per-method table, a 60-minute chart and the latest events.

What it demonstrates:

  • Listeners only push onto a bounded in-memory queue; all MongoDB writes happen in a periodic flush, so observed methods do no extra I/O.
  • Bounded storage: a capped collection for events, per-minute rollups with a TTL index, one heartbeat document per server process.
  • Several instances: a compare-and-set on the snapshot's computedAt lets one process recompute the summary each round, and any process can serve the dashboard.
  • The dashboard subscribes to one summary document, never to the raw events.
  • Private by default: no client IP, and no method arguments except the length of a new task's text.

Verified locally on Meteor 3.6-rc.0: npm run test:headless 8 passing (unit and server integration), npm run e2e:headless 2 passed, npm run lint 0 errors.

Meteor 3.6 is not released yet, so the example targets 3.6-rc.0 and pins ddp-server@=3.4.1-rc360.0: without the pin, rc.0 resolves the 3.5.3 ddp-server, which emits no instrumentation events (meteor/meteor#14849). I will bump the release and remove the pin with the next release.

The root README and examples.json are updated with npm run update:examples.

An admin dashboard built on the instrumentation package that ships with Meteor 3.6: method calls, latency percentiles, errors and DDP connections, with bounded storage that works across several server instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant