Skip to content

feat(cli): Ask about Profiling and add --feedback in the React Native wizard - #2831

Merged
antonis merged 1 commit into
mainfrom
feat/react-native-wizard-profiling-feedback-flag
Dec 3, 2026
Merged

antonis merged 1 commit into
mainfrom
feat/react-native-wizard-profiling-feedback-flag

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Two changes to sentry wizard reactNative, to match the iOS (#2800) and Android (#2808) wizards.

Profiling question. Right after Tracing, the wizard asks the Profiling question (enabledHint: "recommended"), only when Tracing is yes. When Tracing is no, it logs Profiling: no (it only runs during traces, so it needs Tracing), as the other two wizards do. A yes adds this to Sentry.init, after tracesSampleRate:

  // Profiles a share of sampled traces. Adjust this value in production.
  profilesSampleRate: 1.0,

It uses the stable profilesSampleRate option, not _experiments.profilingOptions, which options.ts in getsentry/sentry-react-native marks @experimental. The wizard sets an enable-profiling tag. enableProfiling goes through addSentryInit and the snippet functions, as #2673 did for enableTracing. A sixth positional flag would break max-params, so the snippet functions now take one SentryInitOptions object.

--feedback / --no-feedback. The User Feedback Widget question was a plain clack.confirm with no flag, so a run without a terminal stopped there with exit code 1 even when flags answered every other question. It now has a feedback entry in WIZARD_ANSWER_FLAGS (only: "reactNative") and is asked through askFlagQuestion. The docs link moved from the question into the Yes hint. With neither flag, it is asked as before, with Yes as the default. --help and the generated skill reference list the new flag.

With no flags, the question order is now Tracing, Profiling, Logs, Session Replay, User Feedback Widget.

Open decision: keep this a draft; marking it ready for review is a maintainer call.

via Antonis Lilis.

--

View Session [Sentry]

… wizard

The React Native wizard now asks the Profiling question right after
Tracing, as the iOS and Android wizards do. It is asked only when Tracing
is yes; otherwise the wizard logs that Profiling needs Tracing. A yes adds
the stable `profilesSampleRate: 1.0` to `Sentry.init` and sets the
`enable-profiling` tag.

The User Feedback Widget question was a plain confirm with no flag, so a
run without a terminal stopped there with exit code 1. It now has a
`feedback` entry in WIZARD_ANSWER_FLAGS, so `--feedback`/`--no-feedback`
answer it. With neither flag it is asked as before, with Yes as the
default.

The Sentry.init snippet functions take one options object instead of
positional flags, which max-params would otherwise reject.

Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
@vercel

vercel Bot commented Dec 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Dec 3, 2026 9:41am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 3, 2026 9:41am UTC

Request Review

@antonis
antonis marked this pull request as ready for review December 3, 2026 09:59
@antonis
antonis added this pull request to the merge queue Dec 3, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026
Merged via the queue into main with commit 0f361a0 Dec 3, 2026
32 checks passed
@antonis
antonis deleted the feat/react-native-wizard-profiling-feedback-flag branch December 3, 2026 10:03

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 9c2b5f6d Deployed Dec 3, 2026 by vercel[bot]
Preview – sentry-local — 9c2b5f6d Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant