Repository navigation
feat(cli): Ask about tracing in the React Native wizard - #2673
Merged
Merged
Conversation
The React Native wizard never set up tracing: its `Sentry.init` had no `tracesSampleRate`, and it ignored `--tracing`. It now asks the shared tracing question, with yes recommended as in the Next.js wizard, and on yes writes `tracesSampleRate: 1.0` with a note to lower it in production. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
11 tasks done
Contributor
Author
|
Tested 5f6a8c9 end to end on a fresh
As expected, there are no navigation transactions: Expo Router instrumentation isn't part of this PR (getsentry/sentry-react-native#5139). |
BYK
approved these changes
Dec 1, 2026
This was referenced Dec 2, 2026
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 3, 2026
…sentry#2808) Testing `sentry wizard android` on fresh Android Studio projects (getsentry/sentry-java#6797) showed that the Android wizard turns on tracing for every app without asking: the manifest always gets `io.sentry.traces.sample-rate = 1.0` and `io.sentry.traces.user-interaction.enable = true`. It never offers profiling. This follows getsentry#2800, which made the same change for iOS. The React Native wizard already asks about tracing (getsentry#2673). The wizard now asks Tracing, then Logs as before. It asks Profiling only when Tracing is yes. Profiling uses the `trace` lifecycle, which profiles only during traces, so it needs tracing. When Tracing is no, the wizard skips the question, ignores any `--profiling` flag, and logs `Profiling: no (it only runs during traces, so it needs Tracing)`. It sets the `enable-tracing`, `enable-profiling`, and `enable-logs` tags. `manifest` now takes `{ dsn, enableLogs, enableTracing, enableProfiling }`: - The traces sample rate and user-interaction tracing lines are written only with tracing. User-interaction tracing creates transactions, so it needs tracing. The user-interaction breadcrumbs are a separate option that is on by default, so they don't change. The comment above `traces.user-interaction.enable` now says it enables transactions, not breadcrumbs. - With profiling, the `io.sentry.traces.profiling.session-sample-rate` (1.0) and `io.sentry.traces.profiling.lifecycle` (`trace`) lines come after the tracing lines, as in the Android docs (`docs/platforms/android/index.mdx` in getsentry/sentry-docs). - Everything else stays in the same order, and leaving a block out leaves no extra blank lines. All three questions default to yes, so pressing Enter gives today's manifest plus profiling. <!-- junior-request-attribution:start --> via **Antonis Lilis**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0CAPGCFLSC%3A1796225521.324199 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CAPGCFLSC%3A1796225521.324199) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CAPGCFLSC%3A1796225521.324199/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Antonis Lilis <antonis.lilis@sentry.io>
This was referenced Dec 3, 2026
14 of 16 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The React Native wizard never sets up tracing. Its
Sentry.inithas notracesSampleRate, andsentry wizard reactNative --tracingis accepted but ignored: the shared tracing question applies to every integration, but the React Native wizard never asked it.Key Changes
--tracing/--no-tracinganswer it without a prompt. A yes logs that every trace is sampled and should be lowered in production, and sets anenable-tracingtelemetry tag.Sentry.init(react-native/javascript.ts) gets, aftersendDefaultPii:javascript.test.ts: the exact block, with its blank lines, with tracing on; notracesSampleRatewith it off.Not included: React Navigation and Expo Router integration, which is still to do (#2642).
Verification
create-expo-app(Expo 58,@sentry/react-native8.28.1), the wizard'sSentry.initwith tracing, logs and replay, inserted intosrc/app/_layout.tsx, adds no TypeScript errors: none in_layout.tsx, and the app'stsc --noEmitreports the same 3 errors with and without it, all in the template's web components.sentry wizard --helplists--tracing/--no-tracingfor every integration.End to end (comment):
sentry wizard <org>/<project> reactNativefrom source on a fresh Expo 58.1 / React Native 0.88.1 app with default answers, thennpx expo run:ioson an iOS 18.1 simulator (Debug). The wizard asked the tracing question with "Yes (recommended)" first and wrote the block above. On launch, the app sent aui.loadtransaction (originauto.app.start) withapp.start.coldspans and the app start, frames and stall measurements: trace. There were no navigation transactions, as expected without the Expo Router integration.Part of #2642.
🤖 Generated with Claude Code