Skip to content

Set a persisted uuid as user.id so Sentry can identify number of impacted users #1324

Closed

Description

@bruno-garcia

Sentry is able to show you the impact of an issue by showing the difference between occurances and affected users.

For that, it needs the event.user set to something.
A few ways to have this work:

  1. set_user: The SDK has a function that can be used to set the user to the scope
  2. IP Address: Which Sentry can infer automatically from the connection ({{auto}}). If the project settings in Sentry has this feature enabled, and send_default_pii is set to true
  3. A built-in uuid created when the SDK first runs. And re-used on subsequent runs of the app. We call this installation_id in other SDKs.

Option 3 is not yet available in this SDK. But it's used by Sentry Android, iOS and .NET at least.
Important to note that this uuid cannot be used to identify the "user" across different app installations. So the id should be written to a directory that contains the app's DSN (or a hash of it) in the path.
If the app is reinstalled, or if the DSN is changed, a new ID will be created. And that's OK, the goal is to be privacy conscious the best we can while giving developers an idea of impact of their bugs. NOT TO TRACK USERS, hence the 'uuid' creations on SDK first init.

Relates to:

Activity

  1. added
    Feature
    Improvement
    and removed
    Feature
    on Aug 7, 2025
  2. added
    Errors
    on Mar 26, 2026
  3. self-assigned this
    on Apr 20, 2026
  4. added 3 commits that reference this issue on Apr 25, 2026
    990544f
    112f3b7
    e6d8b02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ErrorsImprovementNative

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions