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.
8 lines
504 B
TypeScript
8 lines
504 B
TypeScript
// The tally app's worker entry: one process per tally. It records in memory and sends its spans and metrics to the
|
|
// server, which stores them (the kit does it when the server has a telemetry store). Its methods called through the
|
|
// server continue the caller's trace: the carrier travels on the wire.
|
|
|
|
import { startWorker } from "../../../src/node/app/index.ts";
|
|
import { API, KINDS } from "./start.ts";
|
|
|
|
startWorker({ api: API, kinds: KINDS, onError: (error) => console.error("worker:", error) });
|