Telemetry: count each sync backend once per app load - #69
Merged
Merged
Conversation
RemoteStorage re-emits "connected" for an already-connected backend during startup (Dropbox emits it twice), so sync-connect events over-counted app loads by connected users. Track providers already reported for the page load and fire once per provider, so the events read as "app loads using <backend>" — a different provider connecting later in the session still counts. Also list sync-connect-remotestorage in the documented event table, which previously only covered Dropbox and Google Drive.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
sync-connect-<backend>events (Dropbox / Google Drive / remoteStorage) over-counted: RemoteStorage re-emitsconnectedfor an already-connected backend on every app load — Dropbox emits it twice — so each page load by a connected user logged multiple events.What
sync-connect-*once per provider. A different provider connecting later in the session still counts.sync-connect-remotestoragerow to the documented event table (previously only Dropbox and Google Drive were listed).Verification
connectedfired twice, produced a singlesync-connect-dropboxbeacon after the fix (2 before).npx tsc --noEmitandeslint src/utils/sync/storage.tsclean.