Add telemetry information into the package#226
Merged
guillaume-byte merged 14 commits intoJun 25, 2026
Conversation
Fires a non-blocking async ping to telemetry.graybx.com/v1/ping: - On first daily import (once per 24h, gated to main process) - On every `weightslab ui launch` Payload: random UUID, event name, package version, Python version, OS, CI flag, client timezone. No PII collected. Raw IP is used server-side for geolocation (country/city) and never stored. Opt-out: WL_NO_TELEMETRY=1. CI environments are auto-detected and skipped via well-known env vars (GITHUB_ACTIONS, CI, GITLAB_CI, etc.). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add in-process guard (_import_pinged_this_process) so multiple `import weightslab` calls within the same Python process only fire one ping, regardless of module reloads or test reruns. The 24h disk-based cooldown still applies on top. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Remove daemon=True so short-lived processes (python -c "import weightslab") wait up to 3 s for the HTTP ping before exiting - Add WL_TELEMETRY_DEBUG=1 to print ping success/failure instead of silently swallowing Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Move the telemetry hook to after the __version__ block so the variable exists when ping_import() is called. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- First-run notice printed to stderr once (flag stored in ~/.weightslab/telemetry_noticed) - Notice explains what is/isn't collected and how to opt out - Skipped in CI and after the first time it has been shown - README telemetry section added with opt-out instructions Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
274f000
into
v1.2.3---UI-Optimization-and-new-features
7 checks passed
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.
Add telemetry information: