Skip to content

docs(snapshots): Add sentry-cli reference page for snapshots#17464

Open
runningcode wants to merge 2 commits intomtopo27/snapshots-ea-product-docsfrom
no/snapshots-cli-docs
Open

docs(snapshots): Add sentry-cli reference page for snapshots#17464
runningcode wants to merge 2 commits intomtopo27/snapshots-ea-product-docsfrom
no/snapshots-cli-docs

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Add a dedicated /cli/snapshots/ page for sentry-cli build snapshots, the command that underpins Snapshots uploads. Makes the command discoverable from the CLI left nav and documents behavior that wasn't previously covered.

  • Adds docs/cli/snapshots.mdx — basic usage, git metadata auto-detection (head/base SHA, VCS provider, PR number), --selective sharding, --diff-threshold, and a full flag reference.
  • Moves the sentry-cli build snapshots flag table out of docs/product/snapshots/uploading-snapshots/index.mdx — that page now links to the CLI reference.
  • Expands the one-line sentry-cli mention in docs/platforms/android/snapshots/index.mdx into a short section with an example for Android users who don't use the Sentry Android Gradle Plugin.

Stacked on top of mtopo27/snapshots-ea-product-docs.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Add a dedicated /cli/snapshots/ page documenting the experimental
`sentry-cli build snapshots` command: basic usage, git metadata
auto-detection behavior, --selective sharding, and the full flag
reference.

Move the flag table out of the uploading-snapshots product page and
link to the new CLI page instead. Expand the Android guide's one-line
sentry-cli mention into a short section with a concrete example for
users who don't use the Sentry Android Gradle Plugin.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Apr 23, 2026 4:01pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Apr 23, 2026 4:01pm

Request Review

@codeowner-assignment codeowner-assignment Bot requested review from a team April 23, 2026 15:45
Comment thread docs/cli/snapshots.mdx
Comment on lines +91 to +101
| `--vcs-provider <PROVIDER>` | VCS provider (for example, `github`). Auto-detected from the git remote. |
| `--head-repo-name <OWNER/REPO>` | Repository in `owner/repo` format. Auto-detected from the git remote. |
| `--base-repo-name <OWNER/REPO>` | Base repository in `owner/repo` format (required for PRs from forks). |
| `--head-ref <BRANCH>` | Head branch name. Auto-detected in CI. |
| `--base-ref <BRANCH>` | Base branch name (PR only). Auto-detected from the remote tracking branch. |
| `--pr-number <NUMBER>` | Pull request number. Auto-detected in GitHub Actions `pull_request` workflows. |
| `--no-git-metadata` | Skip automatic git metadata detection. |
| `--force-git-metadata` | Force git metadata collection outside CI. |
| `--header <KEY:VALUE>` | Custom header attached to all requests. |
| `--log-level <LEVEL>` | Logging verbosity: `trace`, `debug`, `info`, `warn`, or `error`. |
| `--quiet` | Suppress output while preserving exit codes. Alias: `--silent`. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The new documentation for sentry-cli build snapshots omits the --url flag, which was present in the previous documentation, creating a documentation regression.
Severity: MEDIUM

Suggested Fix

Restore the --url flag and its description to the flag reference table in docs/cli/snapshots.mdx. If the flag is no longer functional or is deprecated, this should be explicitly documented rather than silently removing it.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: docs/cli/snapshots.mdx#L80-L101

Potential issue: The documentation for `sentry-cli build snapshots` was moved to a new
page, `docs/cli/snapshots.mdx`. In the process, the `--url <URL>` flag, which was
present in the old documentation, was omitted from the flag reference table in the new
file. The new page is presented as the "full flag reference," making this omission a
documentation regression. This can negatively impact users of self-hosted Sentry
instances who may rely on this flag, as they will no longer find it in the canonical
reference. The removal appears to be unintentional.

Did we get this right? 👍 / 👎 to inform future reviews.

If `theme` references a style the renderer can't resolve (typo, wrong prefix,
or a theme not on the classpath), neither Sentry nor Paparazzi raises an error
or warning. Snapshots still generate, but with incorrect visuals. Double-check
the theme string if rendered output looks unexpected.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think the rendering does not respect the new lines and we can skip this and similar formatting changes

Image

Comment thread docs/cli/snapshots.mdx
sentry-cli build snapshots ./snapshots --app-id web-frontend --diff-threshold 0.01
```

With `0.01`, images with less than 1% of pixels changed are reported as unchanged.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
With `0.01`, images with less than 1% of pixels changed are reported as unchanged.
With a value of `0.01`, images with less than 1% of pixels changed are reported as unchanged.

Copy link
Copy Markdown
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread docs/cli/snapshots.mdx
| `--auth-token <TOKEN>` | Sentry auth token. Can also be set via `SENTRY_AUTH_TOKEN`. |
| `-o`, `--org <ORG>` | Sentry organization slug. Can also be set via `SENTRY_ORG`. |
| `-p`, `--project <PROJECT>` | Sentry project slug. Can also be set via `SENTRY_PROJECT`. |
| `--selective` | Mark the upload as a subset. Use when sharding snapshot generation across parallel jobs. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there backend support for this yet? @runningcode / @NicoHinderling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems like it is, we can have this in, but making a ticket to make explicit docs for how selective testing works as a follow-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants