Skip to content

Commit d0562f4

Browse files
committed
docs: SDK values are defaults that caller values override
1 parent d7cfcc6 commit d0562f4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎docs/migration-7.x-to-8.0.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ You need to change code if your app does any of these:
1616
- sets `$process_person_profile` to turn person processing on for events without a distinct ID
1717
- passes strings such as `"true"` for `$cookieless_mode`, `$ignore_sent_at` or `$process_person_profile`
1818
- expects `super_properties` to override properties passed to a single call, including `$set` and `$groups`
19+
- sets `$is_server`, `$geoip_disable` or a system property such as `$os` and expects the SDK's value to win
1920
- tests the AI integrations with a mock client and asserts on `capture`
2021
- passes its own client object to the AI integrations
2122

@@ -101,7 +102,7 @@ Values apply in this order. Steps 2 to 4 fill only the options and properties th
101102
1. the `options` and `properties` of the call
102103
2. context options and tags
103104
3. `super_options` and `super_properties`
104-
4. values the SDK sets: `options.process_person_profile = false` for events without a distinct ID, and `$release_id` from `POSTHOG_RELEASE_ID`
105+
4. values the SDK sets: `$is_server` from `is_server`, `$geoip_disable` from `disable_geoip`, system properties such as `$os` and `$python_version`, `options.process_person_profile = false` for events without a distinct ID, and `$release_id` from `POSTHOG_RELEASE_ID`
105106
5. `before_send`, which sees the result of steps 1 to 4 and can change or remove any of it
106107
6. legacy properties, which fill unset options and are then removed
107108

@@ -112,7 +113,9 @@ For example, `super_properties={"$set": {"plan": "free", "source": "web"}}` and
112113

113114
These changes follow from this order:
114115

115-
- Properties passed to a call now override `super_properties`. `super_properties` can no longer change `$lib`, `$lib_version` or `$geoip_disable`.
116+
- Properties passed to a call now override `super_properties`. `super_properties` can no longer change `$lib` or `$lib_version`.
117+
- A `$is_server`, `$geoip_disable` or system property such as `$os` that you set in a call or a context tag now wins over the SDK's value. In 7.x the SDK overwrote it. `super_properties` win over the SDK's value too, so `super_properties={"$geoip_disable": False}` turns GeoIP lookup on for events, even with `disable_geoip=True`.
118+
- The `groups` argument merges into a `$groups` property of the call, and wins key by key. In 7.x it replaced the property. MCP events merge their identity's groups into a custom `$groups` property the same way.
116119
- A `$set`, `$set_once`, `$groups` or `$group_set` in `super_properties` no longer replaces the whole value of the call. The two merge, and the call wins key by key.
117120
- An event without a distinct ID gets `options.process_person_profile = false`. A `$process_person_profile: true` property no longer turns person processing back on. Set the option instead.
118121
- To change an option in `before_send`, edit `options`. A legacy property that `before_send` adds does not replace an option that is already set.

0 commit comments

Comments
 (0)