supabase-community / seed

Automatically seed your database with production-like dummy data based on your schema for local development and testing.
MIT License
483 stars 19 forks source link

feat: Adapt telemetry to cater for logged out cases #151

Closed justinvdm closed 6 months ago

justinvdm commented 6 months ago

Determining distinct id (to identify distinct users)

Tested over here: https://www.loom.com/share/eb0e7a224d8b43fcb60504ca3695bb60?from_recorder=1&focus_title=1

https://discord.com/channels/788353076129038346/1234418456204541962/1234498620338864270

linear[bot] commented 6 months ago
S-2098 Adapt telemetry to cater for logged out cases

**Determining distinct id (to identify distinct users)** * If user logged in, use the user id as the distinct id * Otherwise if not CI, get/create anonymous id + use this as the distinct id * Otherwise if in CI and project id exists, use `:ci` as the distinct id * Otherwise do not send metrics (e.g. if logged out CI user) **Aliasing:** * When logged in, if previous distinct id was anonymous id, alias anonymous id to userId [https://discord.com/channels/788353076129038346/1234418456204541962/1234498620338864270](https://discord.com/channels/788353076129038346/1234418456204541962/1234498620338864270)