Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

feat: accept other JSON types as distinct_id, stringify them #65

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

xvello
Copy link
Contributor

@xvello xvello commented Dec 5, 2023

posthog-js accepts any JSON value as distinct_id and capture-py just stringifies them before truncating to 200 chars.

  • Because being 100%-compatible with the map stingification that python does would be a pain, I didn't go into that rabbit-hole and used serde's stable one (keys are sorted, no extra whitespaces). This might churn persons for some
  • capture-py accepts null as a value, but that feels far-fetched as the value is required for the event to be valid. I'll go with the breaking change in that PR, and check ClickHouse to see how many teams would be impacted.

@xvello xvello requested a review from ellie December 5, 2023 10:33
@xvello xvello merged commit 7ff5b80 into main Dec 5, 2023
4 checks passed
@xvello xvello deleted the xvello/distinctid branch December 5, 2023 13:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants