Sentry Andrew McKnight

Sentry's Mobile App Launch Profiling

Original post Mobile App Launch Profiling

Article Summary

Andrew McKnight from Sentry just solved one of mobile performance monitoring's biggest blind spots. Ever wondered what's actually happening in your app before main() even gets called?

Sentry's engineering team has shipped app launch profiling for iOS and Android, capturing performance data from the moment your app starts executing code. This goes beyond Apple's MetricKit and Instruments by profiling the critical pre-main() execution phase that traditional tools miss entirely.

Key Takeaways

Critical Insight

You can now profile real user app launches from the very first line of code execution, revealing performance issues that Apple's own tools don't measure.

Continue reading

What This Article Covers

Problem

Apple's MetricKit only measures launch time until the first frame appears. It misses what happens after that, like splash screens and loading spinners, which actually affect how responsive users think the app is.

Solution

Sentry built app launch profiling by starting the profiler in the SDK's +[load] methods. This captures execution data before main() runs and connects the profiles with Time to Full Display tracing in App Starts insights.

Impact

Developers can now see complete flamechart visualizations of pre-main() execution on real devices. This exposes performance bottlenecks that Apple's tools don't show.

The team considered profiling even the very first install launch, but held back for an interesting reason.

This page summarizes “Mobile App Launch Profiling” by Sentry, published Sep 27, 2024. All credit for the original work goes to the authors.

Read the original on sentry.engineering (opens in new tab)

AI tools for Android

Browse all AI tools →