Skip to content

feat(cli): Ask about tracing and profiling in the Android wizard - #2808

Merged
antonis merged 1 commit into
mainfrom
feat/android-wizard-tracing-profiling
Dec 2, 2026
Merged

antonis merged 1 commit into
mainfrom
feat/android-wizard-tracing-profiling

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

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 #2800, which made the same change for iOS. The React Native wizard already asks about tracing (#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.

via Antonis Lilis.

--

View Session [Sentry]

The Android wizard turned on tracing for every app without asking and
never offered profiling. It now asks Tracing, then Logs, then Profiling
only when Tracing is yes, as the Apple wizard does (#2800).
Profiling uses the `trace` lifecycle, so it needs tracing.

`manifest` takes `{ dsn, enableLogs, enableTracing, enableProfiling }`.
It writes the traces sample rate and user-interaction tracing only with
tracing, and the profiling session sample rate and lifecycle only with
profiling. The user-interaction comment now says it enables
transactions, not breadcrumbs.

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

Request Review

@antonis
antonis added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 999ffe9 Dec 2, 2026
31 checks passed
@antonis
antonis deleted the feat/android-wizard-tracing-profiling branch December 2, 2026 16:24
antonis added a commit that referenced this pull request Dec 2, 2026
…adle-check

Resolve the Android wizard test conflicts with #2804 and #2808: keep
writeActivity(), which returns the Activity's path, and define main's
writeAppWithActivity() on top of it; keep both fs imports; drop the
Sentry import that both sides added.

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

This branch was successfully deployed

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant