Size Analysis

Monitor mobile builds for size changes before they reach users.

Size Analysis monitors your mobile app size to prevent regressions before they reach users. Upload builds from CI to spot regressions early, understand what's inside each bundle, and keep release artifacts lean.

  • Faster downloads reduce install drop-off
  • Install size is linked to uninstall rates, particularly for customers with limited storage or slower connections
  • Size bloat can have downstream technical impact: longer build times, startup times, code complexity, etc.

All Sentry accounts have an included 100 builds of Size Analysis per month. Below are mechanisms to control which builds are processed for Size Analysis.

Control which builds get uploaded by configuring your CI workflow triggers. For example, upload when commits land on main or release branches:

.github/workflows/size_analysis.yml
Copied
on:
  push:
    branches:
      - main
      - release/*

jobs:
  build_and_upload:
    # ...

See Integrating Into CI for end-to-end setup, and our sample GitHub actions for Android and iOS. Platform-specific upload steps are covered in the Upload Guides below.

Size Analysis breaks down your mobile app so you can see exactly where size is coming from. It surfaces Insights that recommend concrete fixes, such as compressing images or stripping debug info.

Size Analysis also provides actionable insights on how you can reduce your app's size. Insights are tailored to each platform. Dive deeper in:

Compare any two builds to see what changed, review module-level diffs, and confirm that optimizations worked. Build comparisons are automatically generated when uploading as part of CI, but can also be manually triggered for any two builds.

The Insight diff shows the changes in insights between the two builds. This diff will show if a new insight is present in the build or if an insight as been addressed.

The table diff shows every file change between the two builds. This diff will show if the file was added, removed, or changed. By default, the table hides changes under 500 B, but you can toggle this directly in the table.

The X-Ray diff shows a visual representation of the file changes between the two builds. This diff will show if the file was added, removed, or changed.

Integrate into CI Size Analysis results on pull requests. You can track size on every commit to ensure there are no unnecessary size increases. You can configure rules to automatically fail checks when thresholds are exceeded.

Learn how to set it up in the CI integration guide.

You can find uploaded builds through the Releases page. Builds will show up in two places:

  1. When a Mobile Project is selected on the Releases page, you will see a "Mobile Builds" tab. This tab will list all the builds for the project.

  2. Mobile Builds will show up in a single Release's details page. Here you will see every build for the Release's version.

You can follow the platform guides to learn how to upload builds for Size Analysis:

Below is the metadata included in your build, regardless of the platform.

We use build metadata to organize builds in the UI and ensure correct comparisons.

FieldDescription
org*Sentry organization slug
project*Sentry project slug
build-configuration*Build configuration describing how the app was built, for example Release or Debug or Release-Bazel
head-shaCurrent commit SHA
base-shaBase commit SHA (for comparisons, recommended to use the branch's merge-base)
vcs-providerVCS provider name (for example github, gitlab, bitbucket, azure, github_enterprise). If not provided, the provider will be auto-detected from the git remote URL. Note: Only github and github_enterprise are supported for status checks.
head-repo-nameRepository name (org/repo)
pr-numberPull request number
head-refBranch or tag name
base-refBase branch name
install-groupInstall group(s) to control update visibility between builds. Can be specified multiple times

* required field

You can further tune your builds for Size Analysis in Sentry Settings. Go to your project's Mobile Builds settings.

By default, Size Analysis processes all uploaded builds. You can configure filters to only process builds for specific criteria, e.g. git_head_ref: main, build_configuration_name: Release, etc. Below is an example filter for a specific bundle (com.emergetools.hackernews) and branch (main).

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").