-
-
Notifications
You must be signed in to change notification settings - Fork 443
E6: client-side product telemetry foundation #462
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
Closed
Closed
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b5980e5
Add ProductTelemetry interface and consent state for E6
rainxchzed d55d505
Add ProductTelemetryImpl with bounded queue, exponential backoff, con…
rainxchzed 2098161
Surface E6 event names and prop keys as Kotlin constants
rainxchzed 4e2a56b
Add product telemetry consent state and toggle action to Tweaks
rainxchzed 2c02650
Fire app_launched on Android Application.onCreate and Desktop main()
rainxchzed 7334492
Add E6 client-side handoff doc with E1 overlap resolution
rainxchzed 27acef0
Merge branch 'main' into feature/e6-telemetry
rainxchzed 22427c4
Render product telemetry consent toggle in privacy settings
rainxchzed 0437cf9
Show first-launch consent sheet on home screen
rainxchzed e6fa4e9
Add TelemetryBuckets helper for duration, count, and confidence bucke…
rainxchzed 4ea0dcb
Wire CRASH and OPERATION_FAILED telemetry events
rainxchzed 3d45e56
Wire COLD_START_MS and FIRST_PAINT_MS telemetry events
rainxchzed 675d631
Wire CACHE_HIT and CACHE_MISS telemetry events in CacheManager
rainxchzed 0283e72
Wire SEARCH_EXECUTED, DETAILS_VIEWED, and UPDATE_INSTALLED telemetry …
rainxchzed a11534b
Migrate import telemetry events from TelemetryRepository to ProductTe…
rainxchzed a8691a2
Wire PROXY_CONFIGURED and PROXY_USED telemetry events
rainxchzed 4d37ad5
Wire SESSION_DURATION telemetry event on app stop
rainxchzed c69a3c9
Add PrivacyAuditTest for telemetry allowlist
rainxchzed 42d0319
Flush product telemetry buffer on app shutdown
rainxchzed 0c2ebd7
Stabilize ProductTelemetryImpl: break Koin cycle, rethrow Cancellatio…
rainxchzed e3f535f
Stop telemetry POST from re-entering the buffer (recursion fix)
rainxchzed 736a23b
GithubStoreApp: per-foreground SESSION_DURATION (off main thread), UE…
rainxchzed 8d92687
DesktopApp: crash-reporter installs first, deep-link forwarders skip …
rainxchzed 07f83e6
UpdateCheckWorker: rethrow CancellationException instead of firing OP…
rainxchzed 87f8210
Replace nav 'from' string with closed DetailsFrom enum
rainxchzed a89d2d5
Fire DETAILS_VIEWED only once per ViewModel instance, not on every Retry
rainxchzed 36a10a8
Hide consent sheet during initial load instead of treating it as 'not…
rainxchzed 3058076
Pin TELEMETRY_SCHEMA_URL to a release commit so the consent sheet mat…
rainxchzed cb22d98
Fire IMPORT_AUTO_LINKED, switch IMPORT_MATCH_ATTEMPTED to TelemetryBu…
rainxchzed de12647
Bucket OPERATION_FAILED error codes by category instead of class simp…
rainxchzed fc99e64
Make UPDATE_INSTALLED and PROXY_CONFIGURED telemetry best-effort so t…
rainxchzed 4fb5e87
Soften privacy copy: 'personal or account identifiers' vs 'any identi…
rainxchzed 762de69
TelemetryBuckets.resultCount: bucket negative input as 'invalid' inst…
rainxchzed c707604
Add language tags to E6 handoff fenced code blocks
rainxchzed e00426c
Consent sheet: tighter button spacing, swap to inline schema view via…
rainxchzed 38e7476
Add inline 'What we collect' view enumerating every actually-fired event
rainxchzed ea71b5e
Stop sending hashed search queries to the legacy /v1/events pipeline
rainxchzed 757e68e
Drop redundant app_launched props (backend strips them; platform/vers…
rainxchzed 7a09872
Acknowledge server-side processing in privacy view (search-misses, HT…
rainxchzed 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
22 changes: 22 additions & 0 deletions
22
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/ColdStart.kt
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,22 @@ | ||
| package zed.rainxch.githubstore.app | ||
|
|
||
| import kotlin.time.TimeSource | ||
|
|
||
| object ColdStart { | ||
| private var mark: TimeSource.Monotonic.ValueTimeMark? = null | ||
| private var consumed: Boolean = false | ||
|
|
||
| fun markStart() { | ||
| if (mark == null) mark = TimeSource.Monotonic.markNow() | ||
| } | ||
|
|
||
| // Returns elapsed ms on the first call after [markStart], null thereafter. | ||
| // Single-process, single-shot — App composable consumes once on first frame. | ||
| fun consumeIfFirst(): Long? { | ||
| if (consumed) return null | ||
| consumed = true | ||
| return mark?.elapsedNow()?.inWholeMilliseconds | ||
| } | ||
|
|
||
| fun elapsedSeconds(): Long? = mark?.elapsedNow()?.inWholeSeconds | ||
| } |
10 changes: 10 additions & 0 deletions
10
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/CrashCategory.kt
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,10 @@ | ||
| package zed.rainxch.githubstore.app | ||
|
|
||
| fun categorizeCrash(throwable: Throwable): String = | ||
| when { | ||
| throwable is OutOfMemoryError -> "other" | ||
| throwable.message?.contains("DataStore", ignoreCase = true) == true -> "data_loss" | ||
| throwable.message?.contains("install", ignoreCase = true) == true -> "install_fail" | ||
| throwable.message?.contains("version", ignoreCase = true) == true -> "version_detect" | ||
| else -> "other" | ||
| } |
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
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.
fire()races the flush in both lifecycle-sensitive paths.ProductTelemetryImpl.fire()appends asynchronously, while both of these paths flush right away. If the enqueue hasn't run yet,SESSION_DURATION/CRASHis dropped even though the flush completes normally. This needs a synchronous/suspend enqueue path for termination-sensitive events before flushing.Also applies to: 99-110