File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,6 +92,27 @@ Events are sent to PostHog. PostHog derives an approximate country from the
9292request IP server-side; the client sends no location data itself. No
9393self-hosted or third-party analytics beyond PostHog are used.
9494
95+ ## On the wire
96+
97+ Events are not sent one at a time. Each captured event is stamped with its
98+ capture time and held in an in-memory queue, which is posted to PostHog's
99+ ` /batch/ ` endpoint when it reaches the batch size or when the batch
100+ interval elapses, whichever comes first. At most one request is ever in
101+ flight: events captured while a request is open wait for it rather than
102+ opening another connection. Exit paths flush the queue, bounded by a short
103+ deadline so a slow endpoint cannot delay quitting.
104+
105+ The queue has a hard depth limit. Once it is full — which in practice means
106+ the endpoint is unreachable, as on a captive portal or behind a hung proxy
107+ — the oldest queued events are dropped to make room for new ones. Telemetry
108+ is therefore lossy by design: it never grows memory without bound, never
109+ retries indefinitely, and never blocks or reports failures to the user.
110+ Nothing is written to disk, so dropped events are gone rather than deferred
111+ to a later run.
112+
113+ See ` src/telemetry/index.ts ` for the batch size, interval, and queue limit
114+ in force.
115+
95116## Not this document
96117
97118Local performance tracing and optional OpenTelemetry export to an operator-owned
You can’t perform that action at this time.
0 commit comments