Skip to content

Android: ManualAppStartup Sentry span duration grows with each close+reopen cycle #86474

@Julesssss

Description

@Julesssss

Problem

On Android, when the app is closed and quickly reopened, the system reuses the still-alive process. Since AppStartTimeProvider is a ContentProvider, its onCreate() only runs once per process — not on each app reopen. This causes the startup timestamp in SharedPreferences to become stale, making the ManualAppStartup Sentry span duration grow with each close+reopen cycle.

Solution

Move the System.currentTimeMillis() recording from AppStartTimeProvider.onCreate() to ExpensifyActivityBase.onCreate(), which is recreated on every app open even with process reuse.

Fix: https://github.com/Expensify/Mobile-Expensify/pull/13900

Issue OwnerCurrent Issue Owner: @war-in

Metadata

Metadata

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