Skip to content
Open
Show file tree
Hide file tree
Changes from 16 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/)
42 changes: 42 additions & 0 deletions docs/platforms/android/size-analysis/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Size Analysis
sidebar_title: Size Analysis
sidebar_order: 5200
description: Upload Android builds to Sentry for Size Analysis.
---

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

[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in preprod to prevent size regressions from reaching users. Aside from being courteous to your users, a smaller app size helps boost conversion and retention rates for the long-tail of customers.
Copy link
Contributor

@coolguyzone coolguyzone Oct 28, 2025

Choose a reason for hiding this comment

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

Suggested change
[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in preprod to prevent size regressions from reaching users. Aside from being courteous to your users, a smaller app size helps boost conversion and retention rates for the long-tail of customers.
[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in pre-production to prevent unexpected size increases (regressions) from reaching users. Aside from being courteous to your users, a smaller app size helps boost installation and retention rates, especially for customers with limited storage or slower connections.


## Getting Started

**Accepted Formats**: AAB (preferred) | IPA
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
**Accepted Formats**: AAB (preferred) | IPA
### Prerequisites
**Accepted Formats**: AAB (preferred) *or* IPA
**Upload Mechanisms**: [Gradle](#uploading-with-gradle) version `6.0.0-alpha.6` or higher *or* [the Sentry CLI](#uploading-with-the-sentry-cli)

Copy link
Author

Choose a reason for hiding this comment

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

Feels a little weird calling this a "Prerequisite"

Copy link

Choose a reason for hiding this comment

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

Bug: Incorrect File Format Listed in Android Docs

The Android Size Analysis documentation's "Accepted Formats" section includes "IPA", which is an iOS-specific file. For Android, this format should be "APK".

Fix in Cursor Fix in Web


**Upload Mechanisms**: [Gradle](#uploading-with-gradle) | [Sentry CLI](#uploading-with-the-sentry-cli)

### Uploading with Gradle

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

### Uploading with the Sentry CLI

<Include name="size-analysis/upload-cli-android" />

## Upload Metadata

<Include name="size-analysis/upload-metadata" />

### Build Configuration

<Include name="size-analysis/build-configuration-android" />

## Best Practices

- **Upload release builds only** - Only upload optimized release builds to get accurate size metrics that represent what users download. Debug builds contain extra symbols and debugging information that inflate the size.

- **Upload on every commit to main** - Configure your CI pipeline to upload builds for every commit merged to your main branch. This creates a complete historical record of your app's size evolution and helps identify which commits introduced size changes.

- **Upload on every PR** - Set up CI to upload builds for every pull request. This enables automatic size comparisons between the PR build and the base branch, allowing you to catch size regressions during code review before merging.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Upload on every PR** - Set up CI to upload builds for every pull request. This enables automatic size comparisons between the PR build and the base branch, allowing you to catch size regressions during code review before merging.
- **Upload on every PR** - Set up CI to upload builds for every pull request. This enables automatic size comparisons between the PR build and the base branch, allowing you to catch size regressions during code review and before merging.


<PageGrid />
107 changes: 107 additions & 0 deletions docs/platforms/android/size-analysis/insights.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: Insights
sidebar_order: 5250
description: Preview how Size Analysis reports highlight Android build trends.
---

TODO: ADD SOME PICS
Copy link

Choose a reason for hiding this comment

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

Bug: Incomplete Android Size Analysis Documentation Highlights

A "TODO: ADD SOME PICS" comment is visible in the Android Size Analysis Insights documentation, indicating incomplete content.

Fix in Cursor Fix in Web


Size Analysis Insights point out how Android app can reduce its size. They spot patterns like duplicate files, oversized media, or unneeded assets, and list exactly what to fix along with the estimated size savings.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Size Analysis Insights point out how Android app can reduce its size. They spot patterns like duplicate files, oversized media, or unneeded assets, and list exactly what to fix along with the estimated size savings.
Size Analysis Insights point out good opportunities to reduce your Android app's size. They spot patterns like duplicate files, oversized media, or unneeded assets, and list exactly what to fix along with the estimated size savings.


## Android Insights

Below are a list of available insights for Android builds.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Below are a list of available insights for Android builds.
Below are a list of available insights for Android builds:

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Below are a list of available insights for Android builds.
Below are a list of available insights for Android builds, followed by more details about each insight:


| Insight | What it catches |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| Insight | What it catches |
| Insight | What it flags |

| --- | --- |
| [Duplicate files](#duplicate-files) | Flags identical payloads you can keep once and drop the copies. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [Duplicate files](#duplicate-files) | Flags identical payloads you can keep once and drop the copies. |
| [Duplicate files](#duplicate-files) | Flags identical payloads so you can drop the duplicates. |

| [Large images](#large-images) | Surfaces oversized image assets worth recompressing or resizing. |
| [Large videos](#large-videos) | Highlights video files that are bigger than typical delivery budgets. |
| [WebP optimization](#webp-optimization) | Tests PNG/JPEG bitmaps to see if lossless WebP would shrink them. |
| [Large audio](#large-audio) | Surfaces hefty audio tracks that could be recompressed or trimmed. |
| [Hermes debug info (RN only)](#hermes-debug-info-rn-only) | Points to bundled Hermes bytecode still carrying debugger metadata. |

### Duplicate files
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Duplicate files
### Duplicate Files


**What it is**: Finds matching files or directories inside `assets/`, `res/`, or embedded libraries.

**How to fix**: Keep one copy and remove or dedupe the rest. For resource folders, consolidate the asset into a shared module or asset pack so the APK bundles it once.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
**How to fix**: Keep one copy and remove or dedupe the rest. For resource folders, consolidate the asset into a shared module or asset pack so the APK bundles it once.
**How to fix**: Keep one copy and remove or dedupe the rest. For resource folders, consolidate the asset into a shared module or asset pack so the APK only bundles it once.


### Large images
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Large images
### Large Images


**What it is**: Flags image files larger than 10 MB.

**How to fix**: Compress them with lossless WebP or resize them before bundling. Options:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
**How to fix**: Compress them with lossless WebP or resize them before bundling. Options:
**How to fix**: Compress or resize the images before bundling.


- Use Android Studio: right-click an image → **Convert to WebP** → choose **Lossless**.
Copy link
Member

Choose a reason for hiding this comment

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

These instructions are for WebP Optimization. I personally do not advocate for keeping the large images or large videos insight as they're really just not useful or actionable.

There's a fair chance these could already be WebP and then our guidance to optimize is useless.

Copy link
Author

Choose a reason for hiding this comment

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

we can reword to say - picked up large media files that might be better off removing / using as a dynamic feature / downloading as not part of the bundle. Not sure the lingo here, if you can take that and run with it

Copy link
Member

Choose a reason for hiding this comment

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

I mean I think these are just useless insights generally, so I'm more recommending we just remove them entirely. If we want to keep them, I guess the following is ok:

### Large Images

**What it is**: Flags image files larger than 10 MB.

**How to fix**: Optimize images with lossless WebP or resize/remove them before bundling.

**Options**:

- Use Android Studio: right-click an image → **Convert to WebP** → choose **Lossless**.
- Use the command line:

  ```bash
  # Install cwebp
  brew install webp

  # Convert PNG to lossless WebP
  cwebp -lossless input.png -o output.webp

  # Convert JPEG to lossless WebP
  cwebp -lossless input.jpg -o output.webp

Large images or splash screens may also load more efficiently if served over the network instead of being bundled with the app.

- Use the command line:

```bash
# Install cwebp
brew install webp

# Convert PNG to lossless WebP
cwebp -lossless input.png -o output.webp

# Convert JPEG to lossless WebP
cwebp -lossless input.jpg -o output.webp
```

Large hero images or splash screens may also benefit from serving them over the network instead of bundling them.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Large hero images or splash screens may also benefit from serving them over the network instead of bundling them.
Large hero images or splash screens may also load more efficiently if served over the network instead of being bundled with the app.


### Large videos
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Large videos
### Large Videos


**What it is**: Highlights bundled video assets above 10 MB.

**How to fix**: Re-encode them to H.264 or HEVC with a lower bitrate, shorten the clip, or host the video remotely and stream it on demand. To shrink a clip in place, try FFmpeg:

```bash
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset slow -c:a copy output.mp4
```

Lower the `-crf` value for higher quality (and larger files) or raise it for smaller files.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Lower the `-crf` value for higher quality (and larger files) or raise it for smaller files.
Lower the `-crf` value for higher quality (and larger files), or raise it for smaller files.


### WebP optimization
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### WebP optimization
### WebP Optimization


**What it is**: Tests every PNG, BMP, JPG, or JPEG (excluding `.9.png`) against lossless WebP conversion. If the WebP variant saves at least 500 bytes, the insight lists the asset.

**How to fix**: Convert the listed bitmap to lossless WebP and update its references. Pick one of the paths below.

#### Option 1: Android Studio

1. In Android Studio, right-click the image.
2. Choose **Convert to WebP…**.
3. Select **Lossless** (API 18+ supports it) and review the preview.

#### Option 2: Command line

```bash
# Install cwebp
brew install webp

# Convert PNG to lossless WebP
cwebp -lossless input.png -o output.webp

# Convert JPEG to lossless WebP
cwebp -lossless input.jpg -o output.webp
```

> Lossless WebP with alpha requires `minSdkVersion` ≥ 18. For older devices, keep PNG fallbacks for assets that rely on transparency.

### Large audio
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Large audio
### Large Audio


**What it is**: Surfaces audio files larger than 5 MB across `res/raw`, `assets`, or libraries.

**How to fix**: Re-encode them at a lower bitrate or modern format using FFmpeg or your DAW, trim unused segments, or stream long-form media instead of bundling it. A quick FFmpeg recompress:

```bash
ffmpeg -i input.wav -c:a aac -b:a 128k output.m4a
```

Tweak the bitrate to balance quality and size.
Copy link
Contributor

Choose a reason for hiding this comment

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

This 'Tweak' line feels out of place, is it one of the options to fix this issue, or does it relate to the bash snippet?

Copy link
Author

Choose a reason for hiding this comment

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

I think its related to the bash snippet - left a note for us to come back and clean up


### Hermes debug info (RN only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Hermes debug info (RN only)
### Hermes Debug Info (React Native Only)


**What it is**: Detects Hermes bytecode bundles that still contain debug info sections.

**How to fix**: Build the React Native bundle in release mode (`react-native bundle --dev false` or the Gradle release task) so Hermes strips debug sections before packaging.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 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,41 @@
---
title: Size Analysis
sidebar_order: 5200
description: Upload iOS builds to Sentry for size analysis.
---

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

[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in preprod to prevent size regressions from reaching users. Aside from being courteous to your users, a smaller app size helps boost conversion and retention rates for the long-tail of customers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in preprod to prevent size regressions from reaching users. Aside from being courteous to your users, a smaller app size helps boost conversion and retention rates for the long-tail of customers.
[Size Analysis](/product/size-analysis) helps you monitor your mobile app's size in pre-production to prevent unexpected size increases (regressions) from reaching users. Aside from being courteous to your users, a smaller app size helps boost installation and retention rates, especially for customers with limited storage or slower connections.


## Getting Started

**Accepted Formats**: XCArchive (preferred) | IPA

**Upload Mechanisms**: [Fastlane Plugin](#uploading-with-fastlane) | [Sentry CLI](#uploading-with-the-sentry-cli)

### Uploading with Fastlane

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

### Uploading with the Sentry CLI

<Include name="size-analysis/upload-cli-ios" />

## Upload Metadata

<Include name="size-analysis/upload-metadata" />

### Build Configuration

<Include name="size-analysis/build-configuration-ios" />

## Best Practices

- **Upload release builds only** - Only upload optimized release builds to get accurate size metrics that represent what users download. Debug builds contain extra symbols and debugging information that inflate the size.

- **Upload on every commit to main** - Configure your CI pipeline to upload builds for every commit merged to your main branch. This creates a complete historical record of your app's size evolution and helps identify which commits introduced size changes.

- **Upload on every PR** - Set up CI to upload builds for every pull request. This enables automatic size comparisons between the PR build and the base branch, allowing you to catch size regressions during code review before merging.

<PageGrid />
Loading