Skip to content
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

[WIP] Telemetry #465

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

[WIP] Telemetry #465

wants to merge 22 commits into from

Conversation

shazarre
Copy link
Contributor

@shazarre shazarre commented Nov 26, 2024

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.


PR-Codex overview

This PR introduces telemetry functionality to the celocli tool, enabling anonymous usage statistics collection and providing configuration options for users to enable or disable telemetry.

Detailed summary

  • Added TELEMETRY_ENABLED environment variable handling.
  • Implemented reportUsageStatisticsIfTelemetryEnabled function.
  • Introduced printTelemetryInformation for user notifications.
  • Updated CeloConfig to include telemetry property.
  • Modified commands to accept --telemetry flag.
  • Created tests for telemetry data sending and configuration.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Nov 26, 2024

⚠️ No Changeset found

Latest commit: 9b3f143

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 41.50943% with 31 lines in your changes missing coverage. Please review.

Project coverage is 56.86%. Comparing base (07c4c78) to head (9b3f143).

❗ There is a different number of reports uploaded between BASE (07c4c78) and HEAD (9b3f143). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (07c4c78) HEAD (9b3f143)
7 5
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #465       +/-   ##
===========================================
- Coverage   73.53%   56.86%   -16.67%     
===========================================
  Files         241      242        +1     
  Lines       10212    10265       +53     
  Branches     1623     1625        +2     
===========================================
- Hits         7509     5837     -1672     
- Misses       2609     4359     +1750     
+ Partials       94       69       -25     
Components Coverage Δ
celocli 39.80% <41.50%> (-45.54%) ⬇️
sdk 68.94% <ø> (ø)
wallets 53.10% <ø> (ø)
viem-sdks 95.08% <ø> (ø)

@aaronmgdr
Copy link
Member

aaronmgdr commented Dec 4, 2024

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.

yarn celocli config:set --telemetry 1

celocli is now gathering anonymous usage statistics.

None of the data being gathered is personally identifiable and no flags or arguments are being stored.

Data being reported is:
  - command (for example network:info)
  - celocli version (for example 5.2.3)
  - success status (0/1)

If you would like to opt out of this data collection, you can do so by running:

celocli config:set --telemetry 0


Thanks for using the celocli! We are interested in your feedback.
Let us know at github.com/celo-org/developer-tooling/discussions/92

lets discuss solutions

@aaronmgdr
Copy link
Member

made discussion to show on message on install, first time the first command is run post install and if telemetry is turned back on

Copy link

gitguardian bot commented Dec 12, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
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
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. 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


🦉 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.

@shazarre shazarre self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants