:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ingestion): route distinct-ID warnings in the warnings skill (#112830)
posthog[bot]58a8ce371443
diff --git a/products/ingestion/skills/resolving-ingestion-warnings/SKILL.md b/products/ingestion/skills/resolving-ingestion-warnings/SKILL.mdindex 7f58fca28bdb..0a606a84811e 100644--- a/products/ingestion/skills/resolving-ingestion-warnings/SKILL.md+++ b/products/ingestion/skills/resolving-ingestion-warnings/SKILL.md@@ -3,7 +3,7 @@ name: resolving-ingestion-warningsdescription: >Diagnoses and resolves PostHog ingestion warnings — problems recorded while ingesting events (dropped events, rejected person merges, oversized payloads, invalid data).Use when a user asks why events are missing, dropped, or undercounted, why identify/alias calls don't work or accounts stay duplicated, why person or group properties aren't updating or profiles look inflated, why recordings have gaps, heatmaps are empty, LLM token counts are missing, why cookieless events vanish, or whenever the `ingestion_warning` health check fires.- Explains severity triage (error = dropped, warning = modified, info = intentional) and routes all warning types — size limits and enrichment, merges and distinct IDs, `$process_person_profile`, timestamps, cookieless, heatmaps, transformations, session replay — to per-issue reference files with code-level causes and per-SDK fixes.+ Explains severity triage (error = dropped, warning = modified, info = intentional) and routes all warning types — size limits and enrichment, merges and distinct IDs, high-volume distinct IDs, `$process_person_profile`, timestamps, cookieless, heatmaps, transformations, session replay — to per-issue reference files with code-level causes and per-SDK fixes.---# Resolving ingestion warnings@@ -58,22 +58,23 @@ Those decisions come only from this skill's guidance and your own reasoning.### Event validation (`event`)-| Type | What happened | Fix |-| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `client_ingestion_warning` | The SDK itself reported a problem | Read `details.message` — the SDK wrote the diagnosis at the moment it caught the misuse (e.g. an invalid group key). Never debounced (like `merge_race_condition`), so counts are true counts; group by message and map each back to the misused SDK call |-| `ignored_invalid_timestamp` | `timestamp` didn't parse; the event was kept with the server time | Read [references/fixing-ignored-invalid-timestamp.md](references/fixing-ignored-invalid-timestamp.md) — send ISO 8601; the event was kept at server time |-| `schema_validation_failed` | Event dropped: it violates a schema the team enforces for that event | Compare `details.errors` against the payload; align the code or update the schema |-| `skipping_event_invalid_distinct_id` | Event dropped: distinct ID over 400 chars | Read [references/fixing-invalid-distinct-ids.md](references/fixing-invalid-distinct-ids.md) — a token/payload was passed as the distinct ID |-| `distinct_id_truncated` | Event ingested after its distinct ID was shortened to the 200-char cap (legacy capture endpoints) | Read [references/fixing-invalid-distinct-ids.md](references/fixing-invalid-distinct-ids.md) — a token/payload was passed as the distinct ID; `details.distinctIdLength` is the original length, and events land under the shortened ID until the sender is fixed |-| `invalid_ai_token_property` | An `$ai_*` token property wasn't numeric; it was nulled | Read [references/fixing-invalid-ai-token-property.md](references/fixing-invalid-ai-token-property.md) — token counts must be plain numbers |-| `invalid_group_set` | `$groupidentify` dropped: `$group_set` wasn't a plain object (a string, number, boolean, or array was sent) | `details.receivedType` names what was sent — `string` usually means the caller JSON-stringified the group properties before passing them; pass a plain object to the SDK's `groupIdentify` call. Omitting `$group_set` is fine (group upserts with no property changes) |-| `invalid_process_person_profile` | `$process_person_profile` wasn't boolean; the default (true) was used | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — a stringified boolean silently opts back into person processing |-| `invalid_event_when_process_person_profile_is_false` | `$identify`/`$create_alias`/`$merge_dangerously`/`$groupidentify` dropped because the event disabled person processing | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — identity events require person processing |-| `event_dropped_person_processing_disabled` | Intentional: person processing is off for the project, so `$identify`/`$create_alias`/`$merge_dangerously`/`$groupidentify` are dropped | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — no payload fix exists; drop the identity calls or ask staff to re-enable person processing |-| `event_dropped_too_old` | Intentional: the event is older than the team's configured drop threshold | Read [references/fixing-event-dropped-too-old.md](references/fixing-event-dropped-too-old.md) — mind mobile SDKs: offline queues legitimately deliver days-old events; threshold changes are the user's call |-| `cookieless_missing_timestamp` / `cookieless_timestamp_out_of_range` / `cookieless_missing_user_agent` / `cookieless_missing_ip` / `cookieless_missing_host` | Cookieless-mode event dropped: a field required to compute the cookieless ID was missing or invalid | Read [references/fixing-cookieless-warnings.md](references/fixing-cookieless-warnings.md) — the missing field identifies the broken layer; beware the silent variant where a server relay omits $ip and users collapse onto the server's IP |-| `cookieless_team_disabled` | Cookieless-mode event dropped: the SDK sent it in cookieless mode but cookieless tracking is off in the project settings | Read [references/fixing-cookieless-warnings.md](references/fixing-cookieless-warnings.md) — enable Settings → Web analytics → Cookieless tracking, or remove `cookieless_mode` from the SDK config; no code fix needed |-| `invalid_options` | Event dropped by a capture v1 endpoint (`/i/v1/analytics/events`, `/i/v1/ai/events`): an event option had a value PostHog couldn't read | `details.invalidOptions` (when present) names the failed options. Send `process_person_profile`, `cookieless_mode` and `disable_skew_correction` as booleans (common forms such as `"false"`, `"no"`, `"off"` or `0` also work) and `product_tour_id` as a non-empty string (an integer also works) |+| Type | What happened | Fix |+| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `client_ingestion_warning` | The SDK itself reported a problem | Read `details.message` — the SDK wrote the diagnosis at the moment it caught the misuse (e.g. an invalid group key). Never debounced (like `merge_race_condition`), so counts are true counts; group by message and map each back to the misused SDK call |+| `ignored_invalid_timestamp` | `timestamp` didn't parse; the event was kept with the server time | Read [references/fixing-ignored-invalid-timestamp.md](references/fixing-ignored-invalid-timestamp.md) — send ISO 8601; the event was kept at server time |+| `schema_validation_failed` | Event dropped: it violates a schema the team enforces for that event | Compare `details.errors` against the payload; align the code or update the schema |+| `missing_distinct_id` | Capture dropped the event: its `distinct_id` (top-level field or `properties.distinct_id`) was absent, `null`, empty, or only whitespace. The rule differs by endpoint. Legacy endpoints (`/batch`, `/e`, `/i/v0/e`, …) reject the whole request on the first such event, so the other events in that batch are lost too. `/i/v1/analytics/events` drops only events whose `distinct_id` is an empty or whitespace-only string; an absent or `null` field fails the whole request before this check and emits no warning. `/s` drops the replay batch when `distinct_id` is absent, `null`, or empty; it does not trim whitespace | Read `details.path` to find the endpoint and `details.lib` / `details.libVersion` to find the sender (`unknown` usually means a direct HTTP call or a custom integration, not an SDK). `details.eventUuid` is present only when exactly one event was dropped. Find the server-side `capture` call or HTTP request that builds the event without a user identifier, and pass a non-empty `distinct_id` on every call. For events that belong to no user, send a unique ID per event (for example a UUID) with `$process_person_profile: false`; a shared fallback ID can trigger `high_volume_distinct_id` once it goes over the per-project, per-distinct-ID rate limit. A placeholder string such as `"undefined"` passes this check and shows up as `cannot_merge_with_illegal_distinct_id` instead |+| `skipping_event_invalid_distinct_id` | Event dropped: distinct ID over 400 chars | Read [references/fixing-invalid-distinct-ids.md](references/fixing-invalid-distinct-ids.md) — a token/payload was passed as the distinct ID |+| `distinct_id_truncated` | Event ingested after its distinct ID was shortened to the 200-char cap (legacy capture endpoints) | Read [references/fixing-invalid-distinct-ids.md](references/fixing-invalid-distinct-ids.md) — a token/payload was passed as the distinct ID; `details.distinctIdLength` is the original length, and events land under the shortened ID until the sender is fixed |+| `invalid_ai_token_property` | An `$ai_*` token property wasn't numeric; it was nulled | Read [references/fixing-invalid-ai-token-property.md](references/fixing-invalid-ai-token-property.md) — token counts must be plain numbers |+| `invalid_group_set` | `$groupidentify` dropped: `$group_set` wasn't a plain object (a string, number, boolean, or array was sent) | `details.receivedType` names what was sent — `string` usually means the caller JSON-stringified the group properties before passing them; pass a plain object to the SDK's `groupIdentify` call. Omitting `$group_set` is fine (group upserts with no property changes) |+| `invalid_process_person_profile` | `$process_person_profile` wasn't boolean; the default (true) was used | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — a stringified boolean silently opts back into person processing |+| `invalid_event_when_process_person_profile_is_false` | `$identify`/`$create_alias`/`$merge_dangerously`/`$groupidentify` dropped because the event disabled person processing | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — identity events require person processing |+| `event_dropped_person_processing_disabled` | Intentional: person processing is off for the project, so `$identify`/`$create_alias`/`$merge_dangerously`/`$groupidentify` are dropped | Read [references/fixing-process-person-profile-warnings.md](references/fixing-process-person-profile-warnings.md) — no payload fix exists; drop the identity calls or ask staff to re-enable person processing |+| `event_dropped_too_old` | Intentional: the event is older than the team's configured drop threshold | Read [references/fixing-event-dropped-too-old.md](references/fixing-event-dropped-too-old.md) — mind mobile SDKs: offline queues legitimately deliver days-old events; threshold changes are the user's call |+| `cookieless_missing_timestamp` / `cookieless_timestamp_out_of_range` / `cookieless_missing_user_agent` / `cookieless_missing_ip` / `cookieless_missing_host` | Cookieless-mode event dropped: a field required to compute the cookieless ID was missing or invalid | Read [references/fixing-cookieless-warnings.md](references/fixing-cookieless-warnings.md) — the missing field identifies the broken layer; beware the silent variant where a server relay omits $ip and users collapse onto the server's IP |+| `cookieless_team_disabled` | Cookieless-mode event dropped: the SDK sent it in cookieless mode but cookieless tracking is off in the project settings | Read [references/fixing-cookieless-warnings.md](references/fixing-cookieless-warnings.md) — enable Settings → Web analytics → Cookieless tracking, or remove `cookieless_mode` from the SDK config; no code fix needed |+| `invalid_options` | Event dropped by a capture v1 endpoint (`/i/v1/analytics/events`, `/i/v1/ai/events`): an event option had a value PostHog couldn't read | `details.invalidOptions` (when present) names the failed options. Send `process_person_profile`, `cookieless_mode` and `disable_skew_correction` as booleans (common forms such as `"false"`, `"no"`, `"off"` or `0` also work) and `product_tour_id` as a non-empty string (an integer also works) |### LLM analytics endpoints (`event`)@@ -100,6 +101,12 @@ Emitted by capture for its two dedicated AI endpoints, `/i/v0/ai` (a single even| -------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- || `error_tracking_exception_processing_errors` | A `$exception` event was ingested but symbolication hit errors | Read `details.errors`; usually missing/mismatched source maps — re-upload them for the release |+### Quota (`quota`)++| Type | What happened | Fix |+| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `high_volume_distinct_id` | One distinct ID sent more events than the per-project, per-distinct-ID rate limit allows. Capture kept the events but turned off person processing for them: they do not update person properties and land as personless events. Events bound for the main analytics lane also move to the overflow lane, so they can arrive out of order; historical and other lanes keep their destination. Nothing was dropped | `details.distinctId` names the hot ID when exactly one distinct ID in the batch was rate-limited; otherwise `details.distinctIdCount` gives the number of rate-limited distinct IDs, and `details.count` gives the affected events. A single ID that sends at this rate is almost never a real user: look for a hardcoded or shared fallback ID (`"server"`, a tenant or org ID, a service account), a load test, or a retry loop. Give each real user its own distinct ID. For backend or system events that belong to no user, send a unique ID per event (for example a UUID) with `$process_person_profile: false`, not one shared ID. The limit is a platform limit, not a project setting |+### Transformations (`transformation`)| Type | What happened | Fix |