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 4dbd65a
Browse filesBrowse the repository at this point in the historyBrowse files
fix: take group and alias ids from the caller, and apply request context by one rule
group_identify uses the caller's distinct id, then the context id, then
$<group_type>_<group_key>, never a random id, and no longer adds the context
session id. alias() no longer takes its target from the context distinct id.
Context tags and options now reach alias and group_identify like capture.
An empty or whitespace-only distinct id counts as missing, and generated
personless distinct ids are UUIDv7.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`group_identify` falls back to the context distinct ID and then to `$<group_type>_<group_key>` instead of a random ID, and no longer adds the context session ID. `alias()` no longer takes its target from the context distinct ID. Context tags and options now apply to `alias` and `group_identify`. An empty or whitespace-only `distinct_id` counts as missing, and generated personless distinct IDs are UUIDv7. `AsyncPosthog` follows the same rules.
Copy file name to clipboardExpand all lines: docs/migration-7.x-to-8.0.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ You need to change code if your app does any of these:
25
25
- sets `$lib` or `$lib_version`, or filters on `$lib = "posthog-python-mcp"`
26
26
- passes a personal API key (`phx_...`) as the project API key
27
27
- reads event content from the SDK's debug log
28
+
- calls `alias()` without a `distinct_id` and relies on the context distinct ID
28
29
29
30
## Endpoints
30
31
@@ -127,6 +128,15 @@ The SDK moves them out of `properties` for you.
127
128
-`None` counts as unset and is removed.
128
129
- Any other value is removed and not sent, because capture would reject the whole batch. 7.x sent it as a property. The SDK logs a warning for each one, with the key and the value's type but not the value.
129
130
131
+
## Identity and request context
132
+
133
+
- An empty or whitespace-only `distinct_id` counts as missing, so the event gets a generated personless distinct ID. 7.x sent a whitespace-only ID, and capture dropped the event.
134
+
- Generated personless distinct IDs are UUIDv7. 7.x generated UUIDv4.
135
+
-`group_identify` uses the `distinct_id` you pass, then the context distinct ID, then `$<group_type>_<group_key>`. 7.x fell back to a random ID, which created a new person on every call.
136
+
-`group_identify` no longer adds the context session ID. A session takes the person of its latest event, and this event's distinct ID is not the session's user.
137
+
-`alias()` needs an explicit `distinct_id`. It no longer falls back to the context distinct ID, which can come from a request header the client controls. Without one, the call is dropped with a warning.
138
+
- Context tags and context options now apply to `alias` and `group_identify`, below the call's own values, as they do for `capture`.
139
+
130
140
## Exceptions
131
141
132
142
-`capture_exception` takes a `level=` argument on `Client`, `AsyncPosthog` and the module. It sets `$exception_level`, for example `"warning"` or `"fatal"`. The default is `"error"`, and an unknown value counts as unset.
0 commit comments