Skip to content

feat(cli): Ask about tracing and profiling in the Apple wizard - #2800

Merged
antonis merged 3 commits into
mainfrom
feat/apple-wizard-ask-tracing-profiling
Dec 2, 2026
Merged

antonis merged 3 commits into
mainfrom
feat/apple-wizard-ask-tracing-profiling

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Testing sentry wizard ios on real projects showed that the Apple wizard turns on tracing (tracesSampleRate = 1.0) and profiling (configureProfiling with sessionSampleRate = 1.0 and the trace lifecycle) for every app without asking. @sentry/wizard does the same. The --tracing and --profiling answer flags already exist, and the React Native wizard asks about tracing (#2673).

The Feature Selection step now asks Tracing first, then Logs as before. It asks Profiling in a second prompt only when Tracing is yes, following the React Router wizard's Instrumentation API follow-up. With the trace lifecycle, profiling only runs during traces, so it does nothing without tracing. When Tracing is no, profiling is off, any --profiling flag is ignored, and the wizard logs why.

getSwiftSnippet and getObjcSnippet now take { dsn, enableLogs, enableTracing, enableProfiling }. They write the tracesSampleRate lines only with tracing, and the profiling block only with profiling. The profiling block stays inside the platform #if from #2791. injectCodeSnippet and addCodeSnippetToProject pass the answers through. The wizard sets enable-tracing, enable-profiling, and enable-logs telemetry tags, using the same names as the React Native and Android wizards.

Both questions default to yes, so pressing Enter keeps today's setup.

via Antonis Lilis.

--

View Session [Sentry]

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

vercel Bot commented Dec 2, 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 2, 2026 3:07pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 2, 2026 3:07pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 2, 2026
antonis and others added 2 commits December 2, 2026 16:06
…-tracing-profiling

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est event

#2798 wraps the test event at the end of both snippets in #if DEBUG.
Update the expected snippets for the tracing and profiling answers, and
check for the profiling #if line instead of any #if, since every snippet
now has one. Pass options to the snippet functions in #2798's test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – sentry-local December 2, 2026 15:07 Inactive
@antonis
antonis enabled auto-merge December 2, 2026 15:09
@antonis
antonis added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit d7a5e0b Dec 2, 2026
31 checks passed
@antonis
antonis deleted the feat/apple-wizard-ask-tracing-profiling branch December 2, 2026 15:25
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 branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 354d5fd6 Deployed Dec 2, 2026 by vercel[bot]
Preview – sentry-local — 354d5fd6 Deployed Dec 2, 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