On this page
Telemetry and privacy
Telemetry is off by default. The Rust, Python, and TypeScript SDKs send nothing anywhere unless you explicitly enable it and supply your own PostHog project key. If you never set either, no telemetry code path runs.
This page exists so you can decide. It is not a prerequisite for using Spot.
What is never collected
No API keys. No prompts, request bodies, or response bodies. No email
addresses, account ids, or anything identifying you or your users. URLs are
recorded as route templates such as /v1/offers/{offer_id} — never a concrete
id or query string.
What is sent, if you turn it on
Events go to your own PostHog project, not to Spot. Four one-time milestones per install, plus one recurring event:
| Event | When |
|---|---|
sdk.initialized | first time you construct a client |
sdk.first_api_call | first completed HTTP call |
sdk.first_order_placed | first order placed |
sdk.first_order_settled | first order settled |
api_call | every call afterwards — route template, method, latency, status code |
Each carries the SDK language and version, a coarse prod/dev marker, a
latency figure, and a random install id used to group one installation's events
together. The install id is a UUID with no relationship to you or your account.
Keeping it off, and turning it on
Off is the default; leaving TOKEN_GATEWAY_TELEMETRY unset — or setting it to
0 or false — keeps it off. There is no way for it to switch itself on.
To enable it for your own analytics:
export TOKEN_GATEWAY_TELEMETRY=1
export TOKEN_GATEWAY_POSTHOG_API_KEY=phc_your_project_key
# optional, for EU cloud or self-hosted PostHog
export TOKEN_GATEWAY_POSTHOG_HOST=https://eu.posthog.com
The environment variable wins when both it and the client's constructor flag are set. Without a PostHog key nothing is sent regardless of the flag.
To pin the install id across runs, set TOKEN_GATEWAY_TELEMETRY_DISTINCT_ID;
otherwise each process generates an ephemeral one.
If you are shipping the SDK inside your own product
If you enable telemetry in software you distribute, tell your users. A short notice naming what is collected, where it goes, and how to disable it is usually enough — the categories above are the complete list.
See also Clients and Authentication.