Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
defc5a6
init emerge docs
mtopo27 Oct 16, 2025
0a0fbaa
delete feature pages (for now)
mtopo27 Oct 17, 2025
a3fc8eb
throwing stuff down
mtopo27 Oct 17, 2025
6c472be
comments
mtopo27 Oct 20, 2025
e136a63
insight
mtopo27 Oct 21, 2025
935e91d
cross platform insights
mtopo27 Oct 21, 2025
84c69b6
iOS changes
trevor-e Oct 24, 2025
4bb7e6f
update insights
trevor-e Oct 24, 2025
87195c4
oops
trevor-e Oct 24, 2025
896c120
Update to alpha.6
runningcode Oct 27, 2025
abde456
Incorporate comments
runningcode Oct 27, 2025
633261f
big refactor to formatting
mtopo27 Oct 28, 2025
b74e732
add some todos
mtopo27 Oct 28, 2025
97371a3
Add links to authenticate
runningcode Oct 28, 2025
a447287
docs(size-analysis): Add best practices and vcsInfo documentation
runningcode Oct 28, 2025
269f074
docs(size-analysis): Add Fastlane metadata override documentation
runningcode Oct 28, 2025
589f484
noah comments
mtopo27 Oct 28, 2025
f5591b1
ios insights
trevor-e Oct 28, 2025
a7827d7
ios insights
trevor-e Oct 28, 2025
5694751
ios setup
trevor-e Oct 28, 2025
07faf8d
docs(size-analysis): Refine CI integration and upload docs
runningcode Oct 29, 2025
9d4d068
docs(size-analysis): Improve installation steps and status check clarity
runningcode Oct 29, 2025
b5759eb
reword intro paragraphs on sdk pages
mtopo27 Oct 29, 2025
a0d62d7
alex comments
mtopo27 Oct 29, 2025
8ca5b1b
Apply suggestion from @coolguyzone
mtopo27 Oct 29, 2025
64a1819
app thinning
trevor-e Oct 29, 2025
467176b
status check image
mtopo27 Oct 29, 2025
4d0d075
compress
mtopo27 Oct 29, 2025
80c7a04
add some pics, delete the insights page
mtopo27 Oct 30, 2025
823a889
typo
mtopo27 Oct 30, 2025
a833c9f
smallstrings
trevor-e Oct 30, 2025
75beead
large images
trevor-e Oct 30, 2025
bd7ffbd
upload metadata
trevor-e Oct 30, 2025
ee1015c
oops
trevor-e Oct 30, 2025
b9a68f6
CI
trevor-e Oct 30, 2025
5485800
rebasing
mtopo27 Oct 30, 2025
9a42ad1
compress images
mtopo27 Oct 30, 2025
1db4298
ci
trevor-e Oct 30, 2025
1244081
remove some todos
mtopo27 Oct 30, 2025
df9ee14
ci
trevor-e Oct 30, 2025
6a331fd
nit
trevor-e Oct 30, 2025
992f405
what's next
trevor-e Oct 30, 2025
31d9785
rework minify insight
mtopo27 Oct 30, 2025
fa0ed6c
debug symbol image
mtopo27 Oct 31, 2025
6cedc29
remove crashlytics reference
mtopo27 Nov 3, 2025
97cf608
small copy
mtopo27 Nov 3, 2025
f0559e1
Merge branch 'master' into mtopo27/size-analysis-docs
mtopo27 Nov 3, 2025
e0f91ce
Merge branch 'master' into mtopo27/size-analysis-docs
mtopo27 Nov 3, 2025
b91ef9b
duplicate file android copy
mtopo27 Nov 3, 2025
161c795
Apply suggestions from code review
mtopo27 Nov 3, 2025
c12af86
match up script
mtopo27 Nov 3, 2025
cd9a844
remove todo
mtopo27 Nov 3, 2025
bcab471
removing some todos
mtopo27 Nov 3, 2025
653bca6
app store connect + thinning
trevor-e Nov 3, 2025
68bfd75
bitrate
mtopo27 Nov 4, 2025
3da246e
final todo
mtopo27 Nov 4, 2025
ba378f7
update image scripts
NicoHinderling Nov 4, 2025
691e7b9
update the dsyms input file value
NicoHinderling Nov 4, 2025
579ca3a
lints
NicoHinderling Nov 4, 2025
5b84ef2
Apply suggestions from code review
mtopo27 Nov 4, 2025
c0432b7
more image info
NicoHinderling Nov 4, 2025
e180436
CI permissions
trevor-e Nov 5, 2025
838e5f3
Apply suggestions from code review
mtopo27 Nov 5, 2025
ff1a6ad
Merge branch 'master' into mtopo27/size-analysis-docs
mtopo27 Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/organization/early-adopter-features/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ Limitations:
- [Dynamic Alerts](/product/alerts/create-alerts/metric-alert-config/#dynamic-alerts)
- [New Trace Explorer With Span Metrics](/product/explore/new-trace-explorer/)
- [OpenTelemetry (OTLP) Logs Endpoint](/concepts/otlp/#opentelemetry-logs)
- [Size Analysis](/product/size-analysis/)
22 changes: 22 additions & 0 deletions docs/platforms/android/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Size Analysis
sidebar_title: Size Analysis
sidebar_order: 5200
description: Upload Android builds to Sentry for size analysis.
---

Size Analysis uploads your Android builds so you can catch size regressions before they reach production.

<Include name="size-analysis/github-only" />

## Quick Start

<Include name="size-analysis/quickstart-intro" />

<Include name="size-analysis/quickstart-gradle" />

<Include name="size-analysis/quickstart-cli" />

## More Upload Basics

See [Uploading Builds](/product/size-analysis/uploading-builds/) for supported formats and required metadata.
21 changes: 21 additions & 0 deletions docs/platforms/apple/guides/ios/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Size Analysis
sidebar_order: 5200
description: Upload iOS builds to Sentry for size analysis.
---

Size Analysis uploads your release builds so you can spot app-size regressions before shipping.

<Include name="size-analysis/github-only" />

## Quick Start

<Include name="size-analysis/quickstart-intro" />

<Include name="size-analysis/quickstart-fastlane" />

<Include name="size-analysis/quickstart-cli" />

## More Upload Basics

See [Uploading Builds](/product/size-analysis/uploading-builds/) for supported formats and required metadata.
23 changes: 23 additions & 0 deletions docs/platforms/dart/guides/flutter/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Size Analysis
sidebar_order: 5200
description: Upload Flutter builds to Sentry for size analysis.
---

Use Size Analysis to monitor how your Flutter app size changes across iOS and Android builds.

<Include name="size-analysis/github-only" />

## Quick Start

<Include name="size-analysis/quickstart-intro" />

<Include name="size-analysis/quickstart-fastlane" />

<Include name="size-analysis/quickstart-gradle" />

<Include name="size-analysis/quickstart-cli" />

## More Upload Basics

See [Uploading Builds](/product/size-analysis/uploading-builds/) for supported formats and required metadata.
24 changes: 24 additions & 0 deletions docs/platforms/react-native/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Size Analysis
sidebar_title: Size Analysis
sidebar_order: 5200
description: Upload React Native iOS and Android builds to Sentry for size analysis.
---

Size Analysis helps React Native teams compare app size across iOS and Android builds from the same pull request.

<Include name="size-analysis/github-only" />

## Quick Start

<Include name="size-analysis/quickstart-intro" />

<Include name="size-analysis/quickstart-fastlane" />

<Include name="size-analysis/quickstart-gradle" />

<Include name="size-analysis/quickstart-cli" />

## More Upload Basics

See [Uploading Builds](/product/size-analysis/uploading-builds/) for supported formats and required metadata.
125 changes: 125 additions & 0 deletions docs/product/size-analysis/github-integration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: GitHub Integration
sidebar_order: 40
description: Set up the GitHub integration to receive size change notifications as PR comments and status checks.
---

The GitHub integration brings Size Analysis directly into your pull request workflow by posting size change summaries as PR comments and status checks.

<Alert level="info">
GitHub is currently the only supported VCS provider for Size Analysis.
</Alert>

## Benefits

With the GitHub integration enabled, you get:

- **PR comments**: Automatic comments on pull requests showing size changes
- **Status checks**: Pass/fail checks based on size thresholds (coming soon)
- **Inline notifications**: See size impacts without leaving GitHub
- **Historical tracking**: Links to detailed comparisons in [sentry.io](https://sentry.io)

## Installation

### Install the Sentry GitHub App

The GitHub integration requires the Sentry GitHub App to be installed on your repository:

1. Navigate to **Organization Settings > Integrations** in [sentry.io](https://sentry.io)
2. Find the **GitHub** integration and click **Install**
3. Follow the prompts to authorize the app for your GitHub organization
4. Select the repositories where you want to enable Size Analysis

For detailed installation instructions, see the [GitHub integration documentation](https://docs.sentry.io/organization/integrations/source-code-mgmt/github/).

### Configure Repository Access

Ensure the Sentry GitHub App has access to the repositories where you're uploading builds:

1. Go to your GitHub organization settings
2. Navigate to **Integrations > Applications**
3. Click on **Sentry**
4. Under **Repository access**, grant access to your repositories

## How It Works

Once the integration is set up and you're uploading builds from your CI:

### On Pull Requests

1. **You open a PR**: Your CI builds the app and uploads it to Sentry
2. **Base branch build**: Sentry finds the corresponding build from your base branch
3. **Comparison**: Sentry compares the two builds
4. **PR comment**: A comment is posted with the size change summary

### Comment Content

The PR comment includes:

- **Total size change**: How much the app grew or shrank (for example, `+142 KB` or `-23 KB`)
- **Percentage change**: The relative impact (for example, `+2.3%`)
- **Component highlights**: The components that changed the most
- **Link to details**: A link to view the full comparison in [sentry.io](https://sentry.io)

### Example PR Comment

```
## 📊 Size Analysis

**App size changed by +142 KB (+2.3%)**

### Largest Changes
- `Frameworks/MyFramework.framework`: +98 KB
- `Resources/Assets.car`: +52 KB
- `Binary`: -8 KB

[View detailed comparison →](https://sentry.io/...)
```

## Requirements

For the GitHub integration to work with Size Analysis:

1. **GitHub App installed**: The Sentry GitHub App must be installed on your repository
2. **Builds from PRs**: You must upload builds from pull request CI runs
3. **Base branch builds**: You must also upload builds from your main/base branch
4. **Metadata**: Your build uploads must include PR metadata (auto-detected in GitHub Actions)

## Troubleshooting

### Not Seeing PR Comments?

Check that:

- The Sentry GitHub App is installed and has access to your repository
- You're uploading builds from both PR branches and the base branch
- Your CI is running on pull request events
- The `SENTRY_AUTH_TOKEN` is set correctly in your CI environment
- Your builds have the same build configuration (for example, both are `Release` builds)

### Comments Not Updating?

- Make sure you're uploading a new build after each code change
- Check that the build configuration matches between PR and base builds
- Verify that the PR metadata (PR number, base SHA) is being detected correctly

### Missing Base Build?

The first time you set up Size Analysis, your main branch may not have any builds yet:

1. Merge a PR or push to your main branch to trigger a build
2. Future PRs will be able to compare against this base build

## Permissions

The GitHub App requires these permissions:

- **Read access to code**: To identify the repository and branches
- **Write access to pull requests**: To post comments on PRs
- **Write access to checks**: To create status checks (coming soon)

These permissions are requested during the GitHub App installation flow.

## Next Steps

- [Upload your first build](/product/size-analysis/uploading-builds/) to start seeing size analysis
55 changes: 55 additions & 0 deletions docs/product/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Size Analysis (Mobile)
sidebar_order: 136
description: Track and optimize your mobile app's binary size with automated uploads, detailed breakdowns, and build comparisons.
---

<Include name="size-analysis/ea" />

Size Analysis helps you monitor and optimize your mobile application's binary size. By tracking your app size across builds and releases, you can catch unexpected size increases, understand what's contributing to your app's footprint, and deliver faster downloads for your users.

## Why Track App Size?

Mobile app size directly impacts user acquisition and retention. Smaller apps:

- Download faster, reducing user drop-off during installation
- Take up less storage space on user devices
- Are more likely to be downloaded on slower networks
- Update more quickly, improving user experience

Size Analysis gives you visibility into your app's size trends and helps you catch regressions before they reach production.

## How Size Analysis Works

### Track Size Across Builds

Upload your iOS (`.xcarchive`, `.ipa`) or Android (`.aab`, `.apk`) builds to Sentry as part of your CI pipeline. Size Analysis automatically extracts size metrics and tracks changes over time. [Get started with automated uploads](/product/size-analysis/uploading-builds/).

### Compare Builds

When you open a pull request, Size Analysis automatically compares your PR build against the base branch, showing you exactly how your changes impact app size. View the results directly in [sentry.io](https://sentry.io) or receive status checks in GitHub.

### Understand Size Contributors

Use the treemap and breakdown views in Sentry to see which components, frameworks, and resources contribute most to your app size so you can identify optimization opportunities quickly.

### Integrate with Your Workflow

Set up the [GitHub integration](/product/size-analysis/github-integration/) to receive size change notifications as PR comments and status checks, making size considerations a natural part of your code review process.

## Supported Platforms
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we mention something about the hybrids (RN, Flutter) that they also work through the native uploaded bundles?


- **iOS**: XCArchive (`.xcarchive`) and IPA (`.ipa`) files
- **Android**: Android App Bundle (`.aab`, preferred) and APK (`.apk`) files

## Requirements

To use Size Analysis, you need:

- A Sentry account with access to any [core plan](https://sentry.io/pricing/)
- A Sentry auth token for uploading builds
- GitHub as your VCS provider (currently the only supported provider)

## Learn More

<PageGrid />
37 changes: 37 additions & 0 deletions docs/product/size-analysis/uploading-builds/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: CLI Uploads
sidebar_order: 30
description: Upload builds to Size Analysis with the Sentry CLI.
---

The Sentry CLI can be used to upload any [accepted mobile build type](/product/size-analysis/uploading-builds/#supported-build-formats).

Set your auth token and use the Sentry CLI to upload iOS or Android builds.

## Set your auth token

```bash
export SENTRY_AUTH_TOKEN=your-token-here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are already assuming they have the sentry-cli installed, I will assume they have this already set up.
Otherwise, there are many ways to auth the sentry-cli. The easiest is probably running sentry-cli login so otherwise we should link to both installation and configuration of the sentry-cli and remove this section.

Suggested change
export SENTRY_AUTH_TOKEN=your-token-here

```

## Upload iOS builds

```bash
sentry-cli build upload app.xcarchive.zip \
--org your-org \
--project your-project \
--build-configuration Release
```

## Upload Android builds

```bash
sentry-cli build upload app.aab \
--org your-org \
--project your-project \
--build-configuration freeRelease # Adjust to your build flavor
```

## GitHub Actions

When you run the CLI in GitHub Actions, metadata like `--repo-name`, `--vcs-provider`, `--pr-number`, `--head-sha`, `--base-sha`, `--head-ref`, and `--base-ref` is filled in automatically. Provide the same flags manually if you upload from another environment.
47 changes: 47 additions & 0 deletions docs/product/size-analysis/uploading-builds/fastlane.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Fastlane Uploads
sidebar_order: 10
description: Configure Size Analysis uploads for iOS projects using Fastlane.
---

This assumes you already have the Sentry Fastlane plugin in your project. See the [Fastlane integration guide](https://docs.sentry.io/platforms/apple/guides/ios/upload-debug-symbols/fastlane/) for the full setup.

## Install the plugin

```ruby
bundle exec fastlane add_plugin fastlane-plugin-sentry
```

Ensure the plugin version is `1.34.0` or higher.

## Add a lane

```ruby
lane :upload_to_sentry do
sentry_upload_build(
org_slug: 'your-org',
project_slug: 'your-project',
build_configuration: 'Release' # Adjust to your configuration
)
end
```

If you already have a lane, add the `sentry_upload_build` action to it.

## Set your auth token in GitHub Actions

```yaml
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
```

## Run the lane

```bash
bundle exec fastlane upload_to_sentry
```

## Next steps

- View the [Sentry Fastlane plugin documentation](https://github.com/getsentry/sentry-fastlane-plugin) for advanced options
- Return to the [Size Analysis upload overview](/product/size-analysis/uploading-builds/)
Loading
Loading