You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a02a4c9
Browse filesBrowse the repository at this point in the historyBrowse files
docs: use real quota tags; a billing limit is a 402
Capture never sends billing_limit_exceeded or billing as a per-event tag.
Product quotas drop single events in a 2xx with tags such as
llm_events_over_quota; a request over the billing limit gets a 402 with
no per-event results.
Capture v1 returns a result for every event, even when the request succeeds.
60
-
An event can be dropped, for example by billing limits or quotas, inside a 2xx response.
60
+
An event can be dropped inside a 2xx response, for example when it is over a product quota.
61
61
8.0 reports those events as failures.
62
+
When the whole request is over the billing limit, capture returns a `402` with no per-event results instead.
62
63
63
64
- Every capture failure is a `CaptureError`. It has these fields:
64
65
-`status`: the HTTP status, or `0` when the request never got a response
65
66
-`endpoint`, `request_id` and `attempts`
66
67
-`drops` and `retry_exhausted`: the uuids that were dropped or ran out of retries
67
68
-`event_results`: a `CaptureEventResult(result, details)` for each uuid, from `posthog.capture_send`
68
-
-`verdict_summary()`: counts such as `drop/billing=1, retry/not_persisted=1`
69
+
-`verdict_summary()`: counts such as `drop/llm_events_over_quota=1, retry/not_persisted=1`
69
70
-`on_error(error, batch)` receives every failure, including in `sync_mode` and from `AsyncPosthog.capture_immediate`.
70
71
- Without `on_error`, the SDK logs one line per failed batch, for example `2 event(s) not persisted by /i/v1/analytics/events: ...`. The line never contains event content or the server's response text.
71
72
- In `sync_mode`, a failed `capture()` calls `on_error` and returns `None`. With `debug=True` it calls `on_error` and then re-raises the error.
0 commit comments