Skip to content

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

@bruno-garcia

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:

Metadata

Metadata

Assignees

Labels

Errorsissues relates to the error reporting productImprovementimprovement for existing featuresNativeplatform label
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions