Expand description
teksilo-analytics-plausible — Plausible adapter for teksilo-telemetry.
Privacy posture: anonymous-by-design. The adapter transmits no
client-side identifier, no UUID,
no fingerprint. Plausible derives a per-day session hash
server-side from X-Forwarded-For + User-Agent + a daily-
rotating server-held salt; this scheme is on the CNIL
consent-exempt audience-measurement list.
ⓘ
use teksilo_analytics_plausible::PlausibleAdapter;
use teksilo_telemetry::{TelemetryBundle, TelemetryMode, UsageReporter};
use std::rc::Rc;
let plausible = PlausibleAdapter::builder()
.endpoint("https://plausible.io/api/event")
.domain("skribisto.app")
.build();
let telemetry = TelemetryBundle::new(EVENT_SCHEMA_VERSION)
.with_anonymous(Rc::new(plausible) as Rc<dyn UsageReporter>)
.with_default_mode(TelemetryMode::Anonymous);Adapter lifecycle:
PlausibleAdapter::builder().build()spawns a worker thread that owns the in-flight buffer and the HTTP client.record(event)converts toOwnedEventand sends through a channel to the worker. Non-blocking — the UI thread never waits on HTTP.- The worker batches up to
max_batch_sizeevents or flushes everyflush_intervaland POSTs to the configured endpoint. - Failed requests are retried with exponential backoff (capped
at
max_backoff). Dropsignals the worker, blocks for graceful shutdown flush. Pending events are best-effort flushed on exit.
Structs§
- Plausible
Adapter - Plausible-backed
UsageReporter. - Plausible
Adapter Builder - Plausible
Config - Static configuration for the Plausible adapter.
- Plausible
Event