Skip to content

Sentry: toggle rework — applicationUsageData rename, debug toggle with 24h auto-off, device classification #75

@gmaclennan

Description

@gmaclennan

Part of #74. Foundation workblock for Phase 11 — the other metrics work builds on this.

Spec: docs/sentry-integration-plan.md §11.1 (three-toggle model), §11.5 (debug toggle + 24h auto-off), §11.2.b (device classification), §11.7 (migrating existing consumers).

Deliverables

  • Rename the captureApplicationData toggle to applicationUsageData everywhere it appears: the JS API, the native module methods, the on-device stored setting, the Expo plugin field, and the command-line flags passed to the Node process. Includes a one-time migration of the stored setting and deprecated aliases for the old names, kept for one minor release (§11.7)
  • New debug toggle: get/setDebugEnabled in JS, a stored sentry.debug setting plus a timestamp of when it was switched on, a --debug flag for the Node process, and a debugDefault plugin field
  • Auto-off: at app start, if debug was switched on more than 24h ago, switch it back off and leave a breadcrumb saying so. Both platforms (§11.5)
  • Device classification: small native helpers that bucket the device into low / mid / high (by RAM + CPU cores) and extract the OS major version. Computed once at startup, passed to JS via the existing sentryConfig constant and to Node via new command-line flags (§11.2.b)

Tests

  • Stored-setting migration (old key → new key, runs once), both platforms
  • 24h auto-off boundary cases; switching on again resets the window. Both platforms
  • Device classification boundary cases (exactly 3 GB RAM, exactly 4 cores)

No change to what's captured yet — that lands in the metrics-layer workblock (#76).

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