Repository navigation
feat: report crashes and player failures to Sentry while diagnostics are on - #332
Conversation
…are on Both apps start Sentry only from a release build carrying putioSentryDsn and only while the account's diagnostics_enabled allows it; an opt-out closes the SDK and purges pending envelopes. Every event and breadcrumb passes an on-device redaction boundary in core/telemetry, the only module that may import Sentry. Refs #31, #35
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 114d9d9926
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address review: exception messages can carry media titles, so the boundary drops them; each Sentry start gets its own on-period, so an SDK still closing after an opt-out cannot upload through a later opt-in; Sentry starts on the launch thread; the audio service reports its own player failures.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44171aaece
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…d models Address review: the cache purge runs even when closing the SDK throws; captures queue behind any pending start, so a failure right after an opt-in reaches the new SDK; the upgrade test pins SentryThread and stack frame fields, and frames drop source lines and local variables.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 758089b18c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…DSN hosts Address review: an opt-out reaches disk before its purge is queued, so a process killed in between still launches with diagnostics off; the build rejects a putioSentryDsn whose host doesn't parse.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8740debbf5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address review: a failed write of an opt-out deletes pending envelopes on the spot instead of waiting for the queued purge, and an unchanged answer no longer rewrites the store on the main thread.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f522934bf2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address review: answers apply in memory first, so the gate ends the on-period before the synchronous write and queues the purge after it.
Replace the URL, credential and filename scrubbers with a beforeSend that copies exception types, stack frames, release metadata, the installation id, a few OS and device facts, and put.io's tags into a new event. Exception values come only from a reported failure's code; breadcrumbs are off. Merge the consent state into DiagnosticsGate and drop the redaction tests for one leak test and the gate cases.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fc6a8417a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ad checks beforeSend now empties the hint, since Sentry sends its attachments (screenshot, view hierarchy, thread dump, tombstone) with whatever event beforeSend returns, and copies proguard debug images as type and uuid so a later mapping upload can deobfuscate frames. Removed as unreachable: - runtime DSN parsing beyond the one shape the build accepts, and the build's extra host check, whose host the relay rewrite discards - the diagnosticsAllowed opt-in clause: requestChange rejects a change that matches current preferences, so a pending opt-in always had it off before - a null consent answer, which behaved exactly like true - the synchronous purge on a failed commit and the isEnabled check before Sentry.close(), which is a no-op on a closed SDK - io.sentry.auto-init, read only by the removed SentryInitProvider - comments restating docs, detekt config or the code below them
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 719a512574
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Restore the fail-closed purge: if the commit fails and the process dies before the queued stopAndPurge, the next launch reads the old answer and would start Sentry over what is cached. Sentry.close() runs only on that queue, so a killed process writes nothing after this purge.
PutioDiagnostics keeps one stored answer and starts or stops Sentry on change; SentryBoundary owns the SDK, an on-period token, the allowlist and the purge. The consent store, filter and runtime interfaces, the persisted enabled-since time, session-key matching and the TelemetryTag enum go. - ANRs from an opted-out period: a start after launch drops events stamped before it, and Sentry marks a dropped exit as reported. If the app dies before that start, the next launch can still send one. - Executor steps use submit, so a failing step can't crash the app. - Apps pass a nullable answer from their auth and settings states. - DebugSentryDsnTest pins that test variants never carry a DSN.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f7fd3b135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A token store that can't be read or cleared now keeps the last answer on both surfaces, as iOS does for a failed restore: the opted-out account's token may still be on the device, so it no longer flips diagnostics on and saves that for the next launch. - PutioDiagnosticsTest shadows SentryAndroid.init and checks that a launch with a stored opt-out opens no period; it previously passed with the stored answer ignored. - SentryBoundaryTest checks the gate closes on stop itself, not only after a later start replaces the period. - release goes: Sentry sets the same package@version+code by default before the options callback. - diagnosticsAllowed() reuses confirmedPreferences; four narrating comments go. - docs: the no-DSN-to-DSN upgrade can report an ANR from an opted-out period, next to the existing app-death edge.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7ccbc93e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Change
Mobile and TV send crashes, ANRs and player failures to Sentry only while the account's Diagnostics control is on, built from an allowlist. Sentry item of #31; TV gate for #35.
flowchart LR L[Launch: last kept answer] --> G{diagnostics_enabled<br/>signed out = on} S[Sign-in, settings read,<br/>Privacy toggle] --> G G -- on, release build with DSN --> R[Start Sentry,<br/>no breadcrumbs] G -- off --> C[Close Sentry,<br/>delete pending envelopes] R --> B[beforeSend: drop while off<br/>or stamped before an opt-in,<br/>else copy the allowlist,<br/>drop attachments] B --> X[relay.put.io]putioSentryDsnreports; none has one yetsurfacetag splits appsValidation
./gradlew verifyand all debug assemblesLeak and gate tests fail with their guard reverted.
Unverified: TV emulator launch (emulator crashes at boot); a live event (no build has a DSN).
Written by an agent (Claude Code, Claude Opus 5.5)