Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop reporting pre warmed app starts #1849

Closed
philipphofmann opened this issue May 24, 2022 · 3 comments · Fixed by #1896
Closed

Stop reporting pre warmed app starts #1849

philipphofmann opened this issue May 24, 2022 · 3 comments · Fixed by #1896
Assignees

Comments

@philipphofmann
Copy link
Member

philipphofmann commented May 24, 2022

Description

Measuring the app start time could be unreliable on iOS 15, see

Because of

Starting with iOS 15, the system might decide to “pre-warm” your app before the user actually tries to open it

https://sourcediving.com/solving-mysterious-logout-issues-on-ios-15-8b818c089466

Investigate if our logic in SentryAppStartTracker is impacted by that.

@matthewreimer
Copy link

This guy (an Apple dev I think) says to use MetricKit to time things like this.

@philipphofmann
Copy link
Member Author

I can confirm that we have an issue with iOS 15 with measuring the app start time. Since iOS 15, the OS might decide to prewarm your app before a user opens it to speed up app start. A quick investigation of app start data of a big customer of ours showed me that the app start is greater than 1 minute on around 5% of transactions containing app start measurements.

Ideally, we should switch to MetricKits MXAppLaunchMetric, which is available for iOS 13 and above. We could drop app start measurements if their duration is bigger than a defined threshold for a quick fix.

@philipphofmann philipphofmann moved this from Needs Investigation to In Progress in Mobile & Cross Platform SDK Jun 17, 2022
@philipphofmann philipphofmann changed the title Check app start times on iOS 15 Stop reporting pre warmed app starts Jun 17, 2022
philipphofmann added a commit that referenced this issue Jun 17, 2022
Since iOS 15, the system might decide to pre-warm your app
before the user tries to open it. In such cases, we can't reliably
measure the app start, and we drop it. Otherwise, we would get
app start times ranging from one minute to even days.

Fixes GH-1849
@philipphofmann
Copy link
Member Author

This is a hot fix. Proper fix will be done in #1897.

philipphofmann added a commit to getsentry/sentry-docs that referenced this issue Jun 17, 2022
With getsentry/sentry-cocoa#1849,
we stop reporting pre warm app starts. Add a note to the docs
to avoid confusion.
philipphofmann added a commit to getsentry/sentry-docs that referenced this issue Jun 17, 2022
With getsentry/sentry-cocoa#1849,
we stop reporting pre warm app starts. Add a note to the docs
to avoid confusion.
philipphofmann added a commit that referenced this issue Jun 17, 2022
Since iOS 15, the system might decide to pre-warm your app
before the user tries to open it. In such cases, we can't reliably
measure the app start, and we drop it. Otherwise, we would get
app start times ranging from one minute to even days.

Fixes GH-1849
Repository owner moved this from In Progress to Done in Mobile & Cross Platform SDK Jun 17, 2022
philipphofmann added a commit to getsentry/sentry-docs that referenced this issue Jun 20, 2022
With getsentry/sentry-cocoa#1849,
we stop reporting pre warm app starts. Add a note to the docs
to avoid confusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants