Repository navigation
docs(cli): Update platform pages to Sentry CLI v4 commands - #20981
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| --- | ||
|
|
||
| If you want to see de-obfuscated stack traces, you'll need to use [ProGuard](https://www.guardsquare.com/proguard) with Sentry. To do so, upload the ProGuard mapping files by either the recommended method of using our [Gradle integration](/platforms/android/configuration/gradle/) or manually by using [sentry-cli](/cli/dif/#proguard-mapping-upload). | ||
| If you want to see de-obfuscated stack traces, you'll need to use [ProGuard](https://www.guardsquare.com/proguard) with Sentry. To do so, upload the ProGuard mapping files by either the recommended method of using our [Gradle integration](/platforms/android/configuration/gradle/) or manually by using the [Sentry CLI](/cli/dif/#proguard-mapping-upload). |
There was a problem hiding this comment.
Hey Junior (and @BYK), looks like this PR and https://github.com/getsentry/sentry-docs/pull/20979/changes are going to produce conflicts when updating. For example, this one updates the term (sentry-cli > Sentry CLI), but not the link, and 20979 updates the link, but not the term.
I'm sure it can be fixed, on one PR or the other once one is published, but wondering if there's any way we should account for possible conflicts before then? Or, maybe it's not a big deal?
Rewrite standalone sentry-cli invocations on platform and product pages for CLI v4 (npm "sentry"), following https://cli.sentry.dev/migrating-from-v3/: - releases new/finalize/... -> release create/finalize/... - sourcemaps -> sourcemap, login -> auth login, send-event -> event send - deploys new -> release deploy, --auth-token -> SENTRY_AUTH_TOKEN - -o/-p on debug-files upload -> --org/--project - install steps -> npm "sentry", getsentry/tools/sentry, cli.sentry.dev/install SDK-bundled CLI contexts (Gradle, Maven, Fastlane, Unity, React Native, MSBuild) keep sentry-cli. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com> Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
Link the first Sentry CLI mention on pages that had no CLI link, or whose only link sat further down, to the getting-started page or the specific v4 command or configuration section. Point the snapshots v3 version note at the migration guide. Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
aee9bff to
09a9c54
Compare
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
|
|
||
| ```bash {tabTitle:Bash/PowerShell} | ||
| sentry-cli debug-files upload --include-sources --org ___ORG_SLUG___ --project ___PROJECT_SLUG___ bin | ||
| sentry debug-files upload --include-sources --org ___ORG_SLUG___ --project ___PROJECT_SLUG___ bin |
There was a problem hiding this comment.
The new CLI doesn't need the --org and --project flags and when it does, it's through the target syntax with org/project?
…dev' into docs/cli-v4-platform-commands # Conflicts: # docs/platforms/javascript/common/sourcemaps/uploading/bundler-plugin-options.mdx
Sentry CLI v4 detects the organization and project from the DSN, the SENTRY_ORG and SENTRY_PROJECT environment variables, or CLI defaults, so debug-files, sourcemap, build and snapshots uploads don't take these flags. Release commands take the org through the org/version target.
…dev' into docs/cli-v4-platform-commands Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
## DESCRIBE YOUR PR > [!IMPORTANT] > **Merge at the Sentry CLI v4 launch, not before.** Tracked in getsentry/toolkit#1965. Sentry CLI v4 (npm `sentry`, from getsentry/toolkit `packages/cli`) replaces `sentry-cli` v3. Its docs live at https://cli.sentry.dev, with a [migration guide](https://cli.sentry.dev/migrating-from-v3/). This PR sends the legacy `/cli/` section there and removes what that leaves orphaned. ### Redirects The rules go in `redirects.js` (Next.js `redirects()`), not `middleware.ts` or `vercel.json`: - Next.js runs config redirects before middleware, so a `/cli/:path*` wildcard in `redirects.js` catches every `/cli/*` URL. Exact entries in `middleware.ts` would never be reached. - `scripts/no-vercel-json-redirects.mjs` blocks redirects in `vercel.json`. - `withMarkdownRedirects` leaves external destinations as they are, so `/cli/<page>.md` goes to the same place. The `/cli/` index goes to the [v3 migration guide](https://cli.sentry.dev/migrating-from-v3/), since someone opening the old CLI docs directly most likely needs to move off v3. Pages with a v4 equivalent map one-to-one. Everything else under `/cli/` goes to the root. Every redirect from the old CLI docs to cli.sentry.dev adds `?from=sentry-docs`, so cli.sentry.dev can show a "these docs moved" banner that points to the migration guide and the v3 repo. That covers the `/cli/*` rules below and the older CLI redirects listed after the table. `/ai/sentry-cli/` was already on master before this PR and stays as is. Content links to cli.sentry.dev are plain links and don't carry the param. | Source | Destination (each with `?from=sentry-docs`) | | --- | --- | | `/cli/` | https://cli.sentry.dev/migrating-from-v3/ | | `/cli/installation/` | https://cli.sentry.dev/getting-started/ | | `/cli/configuration/` | https://cli.sentry.dev/configuration/ | | `/cli/releases/` | https://cli.sentry.dev/commands/release/ | | `/cli/dif/` | https://cli.sentry.dev/commands/debug-files/ | | `/cli/send-event/` | https://cli.sentry.dev/commands/event/ | | `/cli/crons/` | https://cli.sentry.dev/commands/monitor/ | | `/cli/logs/` | https://cli.sentry.dev/commands/log/ | | `/cli/code-mappings/` | https://cli.sentry.dev/commands/code-mappings/ | | `/cli/snapshots/` | https://cli.sentry.dev/commands/snapshots/ | | `/cli/:path*` (everything else) | https://cli.sentry.dev/ | Older redirects that ended at `/cli/...` now point straight at the final target, so nothing chains through two hops. These are `/account/cli/configuration/`, `/product/cli/:path*`, the two Crons CLI redirects, and the `/learn/cli/*` entries in `middleware.ts`. The `middleware.ts` entry for `/cli/metrics/` is removed because the wildcard now catches it first. ### Cleanup - Removes the v3 pages in `docs/cli/`. Their content stays in git history. - Removes the "Looking for the new Sentry CLI?" banner (`includes/cli-looking-for-sentry-cli.mdx`), which only those pages used. - Removes `CliChecksumTable`, which only `docs/cli/installation.mdx` used. - Removes the "Sentry CLI" section from the Concepts sidebar. The "Sentry CLI" item in the Concepts top-nav dropdown now links to https://cli.sentry.dev/. The existing external "Sentry CLI" link in the AI sidebar stays. - Removes `/cli/` from the SDK-agnostic search prefixes and the Algolia product-doc prefixes, and updates the CLI link in `md-overrides/platforms.mdx`. ### `apps.version('sentry-cli')` The release registry entry `app:sentry-cli` will point to v4, so: - `includes/size-analysis/upload-cli-{android,ios}.mdx` no longer print the registry version next to `sentry-cli build upload` instructions. The "minimum 2.58.2" note stays. - `platform-includes/source-context/java.mdx` linked to `getsentry/sentry-cli/releases/tag/<registry version>`, which would 404 once that version is 4.x. It now links to `getsentry/sentry-cli/releases/latest`. - The usage in `docs/cli/installation.mdx` goes away with the page. ### `sentry-cli` references On the pages this PR touches, prose and link text that named the v3 binary now say "Sentry CLI", and the Flutter `releases finalize` example uses `sentry release finalize`. Pages that #20981 rewrites for v4 are left to that PR. `.NET` `msbuild.mdx` no longer tells workstation users to run `sentry-cli login`, since v4's `sentry auth login` doesn't write the `.sentryclirc` file that the MSBuild integration's bundled CLI reads. Workstations set an organization auth token in `SENTRY_AUTH_TOKEN`, the same as CI. These stay on `sentry-cli`: - `.NET` `msbuild.mdx`: `sentry-cli releases propose-version`, which the MSBuild integration's bundled v3 CLI runs. - React Native legacy uploading methods: the `node_modules/@sentry/cli/bin/sentry-cli` path of the package the SDK installs. - The Flutter plugin's `https://downloads.sentry-cdn.com/sentry-cli` default CDN URL. - The `/ai/sentry-cli/` redirect source, the v3 comment in `redirects.js`, and the Unity `sentry-cli-option-configuration.png` image file name. ### Not in this PR Content links that pointed to `/cli/...` now point straight at their cli.sentry.dev targets. Many of those pages still describe v3 (`sentry-cli <command>`, and section anchors that cli.sentry.dev doesn't have); updating them for v4 is follow-up work. ### Screenshots **Before (production):** the Concepts sidebar has a "Sentry CLI" section with the v3 pages.  **After (local):** the Concepts sidebar has no CLI section.  **After (local):** the "Sentry CLI" item in the Concepts dropdown now links to `https://cli.sentry.dev/`.  ## IS YOUR CHANGE URGENT? - [x] Other deadline: Sentry CLI v4 launch (merge at launch) - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] 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](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A11aa7117825ac7a642c76f36e8b464ae --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A11aa7117825ac7a642c76f36e8b464ae) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A11aa7117825ac7a642c76f36e8b464ae/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com> Co-authored-by: Shannon Anahata <shannon.anahata@sentry.io> Co-authored-by: Burak Yigit Kaya <byk@sentry.io> Co-authored-by: Shannon Anahata <shannon.anahata@gmail.com>
## DESCRIBE YOUR PR This follows #20979 and #20981, which are already in `master`. It moves the remaining pages to Sentry CLI v4 (npm `sentry`), following the [v3 → v4 migration guide](https://cli.sentry.dev/migrating-from-v3/). - **Commands users run themselves** now use v4: `sentry-cli sourcemaps upload` → [`sentry sourcemap upload`](https://cli.sentry.dev/commands/sourcemap/#sentry-sourcemap-upload-directory) on the Next.js, SvelteKit, Nitro, Nuxt, SolidStart and TanStack Start pages. The manual `.so` upload on the Android NDK page points to `sentry debug-files upload`, and the manual mapping upload on the Expo Gradle page to `sentry proguard upload`. - **Prose** says "the Sentry CLI" instead of `sentry-cli`. General mentions link the getting-started page, and command mentions link the command page. - **Troubleshooting**: the JS source maps page says that v4 has no `--decompress` flag. The debug ID requirement lists v4, or 2.17.0+ with the older command names. - **Pinned to v3**: the Expo and CodePush manual uploads now run `npx @sentry/cli@3 sourcemaps upload`. They use v3-only flags, and once `@sentry/cli` 4.0.0 is `latest`, plain `npx @sentry/cli` would resolve to v4 and fail. - **Cosmetic**: the Unity screenshot `sentry-cli-option-configuration.png` is now `cli-options-configuration.png`, and the `redirects.js` comment no longer says `sentry-cli`. The `/ai/sentry-cli/` redirect source stays, because people have bookmarked it. The develop-docs AI tools table links cli.sentry.dev directly instead of that redirect. Every cli.sentry.dev link and `#fragment` in the repo resolves against the v4 docs built from getsentry/toolkit `main`. ### Intentionally left on `sentry-cli` These lines describe a real v3 artifact, so they keep the v3 name, path or command: | Where | Why | |---|---| | React Native and Expo `node_modules/@sentry/cli/bin/sentry-cli …`, `npx @sentry/cli@3 sourcemaps upload …`, `SENTRY_CLI_EXECUTABLE` paths, Xcode build phase scripts | `@sentry/react-native` bundles `@sentry/cli` 3.8.2. These commands use v3-only flags (`--bundle`, `--bundle-sourcemap`, `--debug-id-reference`, several paths). | | Legacy JS source maps includes (`legacy-uploading-methods`, `legacy-troubleshooting`) | They document release-artifact uploads for Sentry CLI 2.16.1 and older. | | Maven source context: `/path/to/sentry-cli` and the getsentry/sentry-cli releases links | The Maven plugin runs a bundled v3 binary (3.8.2). These lines show how to point it at your own binary. | | Flutter plugin `sentry_cli_cdn_url` default `https://downloads.sentry-cdn.com/sentry-cli` | This is the plugin's real default URL. | | getsentry/sentry-cli release links (3.0.0, 2.10.0, 2.0.0, 1.51.1) and the `@sentry/cli` 1.51.1 note | Version notes about v3 releases. | | develop-docs: `sentry-cli` in the API deprecation checklist, and the getsentry/sentry-cli `AGENTS.md` example | These name the repository. The checklist now lists `toolkit` (v4) too. | | `sentry-cli-execution-failure` page path, `sentry-cli-sourcemaps.mdx` include name, `#…-with-the-sentry-cli` heading anchors | URLs and file names. The anchors come from "…with the Sentry CLI" headings. | | `public/_platforms/*.json` | Frozen legacy onboarding snapshots. | ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] 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](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Acaf5a8738f7d0345b1020fd48f2a7dd4 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Acaf5a8738f7d0345b1020fd48f2a7dd4) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Acaf5a8738f7d0345b1020fd48f2a7dd4/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
Important
Merge at the Sentry CLI v4 launch, after #20979. Before launch these commands don't match the CLI that users install. This PR is stacked on #20979 (the
/cli/*→ cli.sentry.dev redirect): the lines both PRs edit keep this PR's wording and #20979's cli.sentry.dev links. Merge #20979 first, then make sure this PR's base ismasterbefore merging it. GitHub switches it automatically only if the #20979 branch gets deleted.DESCRIBE YOUR PR
This PR rewrites the standalone
sentry-clicommands on platform and product pages for Sentry CLI v4 (npmsentry). It follows the v3 → v4 migration guide. It's part of the v4 launch tracked in getsentry/toolkit#1965.It covers two groups of pages:
sentry-clitosentry, or from "sentry-cli" to "the Sentry CLI" in prose.sentry-cli releases new Vsentry release create V(-p a,bcomma-separated, not repeated)sentry-cli releases finalize/set-commits/propose-version/archive/restoresentry release …sentry-cli sourcemaps inject/uploadsentry sourcemap inject/uploadsentry-cli loginsentry auth loginsentry-cli send-eventsentry event sendsentry-cli deploys new -e ENVsentry release deploy $VERSION ENVsentry-cli releases --org O deploys V new -e Esentry release deploy O/V Esentry-cli --auth-token T …SENTRY_AUTH_TOKEN=T sentry …debug-files upload -o O -p Pdebug-files upload --org O --project Pnpm install @sentry/cli,brew install getsentry/tools/sentry-cli,curl sentry.io/get-clinpm install sentry,brew install getsentry/tools/sentry,npm install -g sentry(the migration guide's CI recommendation)Intentionally left on
sentry-cliThese pages run the CLI that ships inside an SDK or build plugin, not a CLI the user installs:
--bundle/--bundle-sourcemap), hermes, jsc, codepush, manual-setup, legacy uploading methods.gradle.mdx, Androidconfiguration/gradle.mdx, Javamaven, Appledsym(Fastlane), and the Flutter plugin include.msbuild.mdx: itsloginfeeds the bundled v3 CLI, and v4 never writes.sentryclirc.Reviewer notes
sentry-cli.--force-foregroundhas no v4 equivalent. It's removed from the Xcode build-phase scripts, along with the alert that described it.source-context/java.mdx,SENTRY_PROPERTIES/.propertiesnow reads.sentryclirconly, because v4 doesn't readSENTRY_PROPERTIES.npm install -g sentry, so those jobs need Node.Each rewritten command was parsed by the published v4 CLI with no unknown-flag, alias, or command errors.
Screenshots
CircleCI release automation:
Apple dSYM upload ("Sentry CLI" section, anchor is still
#sentry-cli):IS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST
via @BYK, shannon.anahata.
--
View Session [Sentry]