Skip to content

Sentry: installation-UUID user.id with monthly rotation + toggle anchor resets #78

@gmaclennan

Description

@gmaclennan

Part of #74. Depends on #75 (uses the renamed applicationUsageData toggle).

Spec: docs/sentry-integration-plan.md §9b.2 (installation ID + rotation), §11.4 (the user.id contract), §9b.9 (resetting exit-tracking timestamps when toggles flip).

Deliverables

  • A per-install random UUID, stored in the app's on-device settings — deliberately not the secure keychain, so uninstalling genuinely resets identity
  • user.id derived when the app starts: a monthly-rotating hash of the UUID by default, or the raw UUID when applicationUsageData is on. The hash rotates so activity in different months can't be linked; the raw UUID means a user who shares their installation ID for a bug report can be found in Sentry (§11.4)
  • The same user.id on all three Sentry SDKs: computed natively (the Android background process needs it before React Native starts), exposed to JS via sentryConfig, passed to Node via a command-line flag; set with Sentry.setUser and locked so the host app can't override it
  • When a toggle flips from off to on, reset the app-exit tracking timestamps so exit records from the "off" period are never reported (§9b.9)

Tests

  • Hash changes across a month boundary; raw id stays stable when the usage tier is on; flipping the toggle changes user.id at the next launch
  • Timestamp reset on both toggle setters

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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