mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The four telemetry gaps (rows on commits, chord.host, microsecond times, a read-only store) and: pages record and send span batches over their link to the server's ingest object (checked, capped, rate-limited, stamped browser and with the link's principal); workers send theirs too, so the server is the store's only writer; principalAttributes lets an app choose what a span records about its principal. The tutorial shows a real page's click traced to the worker, with the trace viewer.
9 lines
608 B
TypeScript
9 lines
608 B
TypeScript
// The todo app's worker entry: one process per list. `startWorker` opens the list's store in its directory, connects
|
|
// to the server and loads the plugins' worker facets. The worker records its spans in memory and sends them to the
|
|
// server, which stores them: its methods called through the server continue the caller's trace.
|
|
|
|
import { startWorker } from "../../../src/node/app/index.ts";
|
|
import { principalAttributes } from "./src/principals.ts";
|
|
import { API, KINDS } from "./start.ts";
|
|
|
|
startWorker({ api: API, kinds: KINDS, principalAttributes, onError: (error) => console.error("list:", error) });
|