Repository navigation
feat(ios): report game reminder lifecycle to Sentry #1678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
EnderOfWorlds007
wants to merge
28
commits into
main
Choose a base branch
from
claude/ios-reminder-telemetry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,066
−200
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d8b6ecc
feat(ios): expose native host telemetry to products
EnderOfWorlds007 411203d
fix(ios): use the agreed debug telemetry variant
EnderOfWorlds007 bad3dc4
fix(ios): keep host telemetry best effort
EnderOfWorlds007 0f12e1e
fix(ios): qualify TrUAPI host version lookup
EnderOfWorlds007 f175b27
fix(ios): call generated host version function
EnderOfWorlds007 88e27fb
Merge remote-tracking branch 'origin/main' into codex/pre-ios-host-te…
EnderOfWorlds007 ac385d0
fix(ios): use failable telemetry JSON conversion
EnderOfWorlds007 2c11c4a
fix(ios): stabilize telemetry bootstrap JSON
EnderOfWorlds007 9a027f3
fix(ios): log host telemetry bootstrap failures
EnderOfWorlds007 2da35d1
fix(ios): normalize host telemetry OS version
EnderOfWorlds007 2d7f127
fix(ios): avoid actor-isolated OS metadata
EnderOfWorlds007 4f28bc3
test(ios): avoid nested requirement macros
EnderOfWorlds007 dabb79e
feat(ios): report game reminder lifecycle to Sentry
EnderOfWorlds007 03bbc2b
fix(ios): count the Play tap as the open, match Android's reminder fi…
EnderOfWorlds007 bc4b841
style(ios): wrap the reminder event line to the 120-column limit
EnderOfWorlds007 9e62968
Merge remote-tracking branch 'origin/main' into codex/pre-ios-host-te…
EnderOfWorlds007 ab88afe
feat(ios): consolidate native host telemetry
EnderOfWorlds007 15331dd
refactor(ios): use game reminder diagnostics
EnderOfWorlds007 cfade2b
refactor(ios): build reminder diagnostics on host events
EnderOfWorlds007 4955936
fix(ios): drop stale reminder on past replacement
EnderOfWorlds007 fc76813
Merge origin/main into claude/ios-reminder-telemetry
EnderOfWorlds007 a840081
Merge remote-tracking branch 'origin/main' into codex/pr1678-game-rem…
EnderOfWorlds007 f0f9db6
fix(ios): match reminder recorder autoclosure
EnderOfWorlds007 6292db6
Merge origin/main into claude/ios-reminder-telemetry
EnderOfWorlds007 2fc760e
fix(ios): trim game reminder telemetry to diagnostics plumbing and sh…
EnderOfWorlds007 0e2a4f6
fix(ios): keep the alarm reminder alive while its booking test waits
EnderOfWorlds007 0566cc0
test(ios): split the game reminder center tests and share their doubles
EnderOfWorlds007 2e7f6dc
fix(ios): correct the reminder start doc and match the sibling observ…
EnderOfWorlds007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
24 changes: 24 additions & 0 deletions
24
hosts/ios/polkadot-app/Common/Services/GameReminder/GameReminderDiagnostics.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import Foundation | ||
| import IssueMonitoring | ||
|
|
||
| /// Records the troubleshooting trail for a product's game reminder through the shared host-event path. | ||
| struct GameReminderDiagnostics: Sendable { | ||
| private let recorder: any HostEventRecording | ||
| private let origin: HostEventOrigin | ||
| private let monotonicMilliseconds: @Sendable () -> Int | ||
|
|
||
| init( | ||
| recorder: any HostEventRecording = NoopHostEventRecorder(), | ||
| origin: HostEventOrigin = .current, | ||
| monotonicMilliseconds: @escaping @Sendable () -> Int = HostEventClock.monotonicMilliseconds | ||
| ) { | ||
| self.recorder = recorder | ||
| self.origin = origin | ||
| self.monotonicMilliseconds = monotonicMilliseconds | ||
| } | ||
|
|
||
| /// The event is built only when the recorder keeps it. | ||
| func record(_ event: @autoclosure () -> GameReminderEvent) { | ||
| recorder.record(event().hostEvent(origin: origin, monotonicMilliseconds: monotonicMilliseconds())) | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are polluting actual logic with diagnostics and at some point it will be hard to read. What about putting all the event assembly inside diagnostic? We could have different classes of diagnostics depending on use case. In that way actual production code will just contain diagnostic instance injected without with
recordfunction call. What do you think?