Repository navigation
Conversation
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.
Feat: Anonymous, opt-in exit telemetry & privacy-first diagnostic reporting (#176)
Fixes #176
This PR adds opt-in anonymous telemetry for SpeakType, based on the requirements in #176.
The goal is to collect useful compatibility and reliability data without collecting user content. Telemetry is disabled by default, never includes audio or transcripts, and uses a randomly generated UUID that users can reset at any time.
Users can also inspect the exact payload that would be sent from the app.
What changed
Telemetry settings are now included in
SettingsStore, with backward-compatible fallbacks for existing installations.A random UUID v4 is generated for each installation and used only as an anonymous identifier. It does not use hardware IDs, MAC addresses, usernames, or account information.
Users can regenerate this ID from
Settings → Privacy & Diagnostics.The telemetry payload currently includes:
No audio, transcripts, typed text, app names, window titles, filenames, dictionary entries, or other user content are collected.
Dictation statistics are tracked through
TelemetryStats, which keeps aggregate success/failure counts and groups errors by their error string.A sample payload looks like this:
{ "anonymous_id": "e1bd5034-dad4-498e-b6db-81ab89c06120", "os_name": "Fedora Linux", "os_version": "44", "arch": "x86_64", "kernel_version": "7.1.9-200.fc44.x86_64", "distribution_id": "fedora", "desktop_env": "GNOME (Wayland)", "app_version": "2.0.0", "model": "base", "stats": { "success_count": 0, "fail_count": 0, "errors": {} } }Sending telemetry
Telemetry is sent as JSON using an HTTP POST request.
The default endpoint is:
https://telemetry.speaktype.com/api/v1/telemetryFor development or self-hosted testing, it can be overridden using:
SPEAKTYPE_TELEMETRY_ENDPOINTor
SPEAKTYPE_TELEMETRY_URLRequests use
User-Agent: SpeakType/<version>and have a 3-second timeout.Telemetry is sent during application shutdown through
clean_exit().The blocking send runs on a separate thread so it can safely wait for the async HTTP request without causing Tokio runtime re-entry issues during Tauri shutdown handling.
If telemetry is disabled, the app exits normally without sending anything.
UI
A new Privacy & Diagnostics section has been added to Settings.
Users can:
There is also an optional setting to show the telemetry payload before exit.
For development builds, the sidebar also shows whether telemetry is enabled and provides a quick way to test the shutdown flow.
Privacy
The telemetry is intentionally limited to diagnostic information.
x86_64oraarch64is collectedThe anonymous ID is generated locally and can be rotated by the user at any time.
Main files changed
The main backend work is in:
desktop/src-tauri/src/telemetry.rsdesktop/src-tauri/src/settings.rsdesktop/src-tauri/src/dictation.rsdesktop/src-tauri/src/commands.rsdesktop/src-tauri/src/lib.rsLinux desktop and display-server detection was also updated in the platform-specific modules.
Frontend changes include:
desktop/src/screens/settings/SettingsScreen.tsxdesktop/src/components/TelemetryDialog.tsxdesktop/src/lib/api.tsdesktop/src/lib/store.tsxThe root README and desktop README were also updated to document how telemetry works and what data is collected.
Testing
cargo test --libpasses with all 79 tests.Tests cover:
Frontend checks also pass:
npm run typecheck npm testI also manually tested: