-
Notifications
You must be signed in to change notification settings - Fork 11
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
Telemetry #465
Telemetry #465
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #465 +/- ##
==========================================
+ Coverage 76.18% 76.26% +0.07%
==========================================
Files 245 246 +1
Lines 10310 10365 +55
Branches 1630 1635 +5
==========================================
+ Hits 7855 7905 +50
+ Misses 2366 2335 -31
- Partials 89 125 +36
|
some thoughts. The info here takes up a lot of space. Im worried people want to opt out just to avoid seeing the annoying warning every time they run a command.
lets discuss solutions |
made discussion to show on message on install, first time the first command is run post install and if telemetry is turned back on |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
14107627 | Triggered | Generic High Entropy Secret | 095058c | packages/cli/src/commands/account/new.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
…oling into shazarre/Telemetry
}, | ||
signal: controller.signal, | ||
body: ` | ||
${telemetryData} |
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.
Im surprised you can send plain text as octet-stream
, thought you had to transmit as a blob/buffer kind of body
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.
nice work!
Description
This PR adds telemetry to celocli.
Other changes
Removes unnecessary
postinstall
hook invocation.Tested
Ran tests locally and on CI. Ran actual code locally to make sure telemetry is being sent.
For detailed testing please see the how to QA instructions below.
How to QA
First make sure that you start fresh with the telemetry notice:
$ rm ~/.config/@celo/celocli/.telemetry
Also make sure that telemetry is neither explicitly enabled nor disabled in the config:
the JSON should not contain
telemetry
property, if it does, remove it.Run a command (with
DEBUG
on to see debug information):You should see the telemetry notice and debug information about successfully sending the usage information.
Consequent run should not display the notice, but you should still see the debug information:
Now set
telemetry
config value to0
, debug information should show that telemetry is disabled:Now run a command and you should see again that telemetry is disabled.
$ DEBUG="celocli:telemetry" yarn workspace @celo/celocli run dev network:parameters --node alfajores (...) celocli:telemetry Telemetry is disabled +0ms
Now set a different config value, telemetry should stay disabled:
Display the config and make sure telemetry is
false
:Verify by running a command and you should see again that telemetry is still disabled.
$ DEBUG="celocli:telemetry" yarn workspace @celo/celocli run dev network:parameters --node alfajores (...) celocli:telemetry Telemetry is disabled +0ms
Now set
telemetry
config value to1
, debug information should show that telemetry is enabled:Now run a command and you should see again that telemetry is being sent.
PR-Codex overview
This PR introduces telemetry functionality to collect usage statistics for the
celocli
tool, allowing users to enable or disable data collection through configuration. It also updates tests and documentation to reflect these changes.Detailed summary
TELEMETRY_ENABLED
environment variable handling.reportUsageStatisticsIfTelemetryEnabled
for usage reporting.BaseCommand
to call telemetry reporting.--telemetry
flag toconfig:set
command.CeloConfig
to includetelemetry
field.