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

feat(telemetry): support DO_NOT_TRACK and CI env variables to disable telemetry #162

Merged
merged 4 commits into from
May 13, 2024

Conversation

peterwht
Copy link
Contributor

@peterwht peterwht commented May 12, 2024

Introduces two new ways to disable telemetry.

This can be done by setting either the DO_NOT_TRACK or CI environment variables to 1 or true.

@peterwht peterwht requested a review from evilrobot-01 May 12, 2024 22:59
Copy link

codecov bot commented May 12, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 48.43%. Comparing base (85353ae) to head (f2d4257).
Report is 1 commits behind head on main.

@@            Coverage Diff             @@
##             main     #162      +/-   ##
==========================================
+ Coverage   47.07%   48.43%   +1.35%     
==========================================
  Files          32       32              
  Lines        2649     2707      +58     
  Branches     2649     2707      +58     
==========================================
+ Hits         1247     1311      +64     
+ Misses       1214     1194      -20     
- Partials      188      202      +14     
Files Coverage Δ
crates/pop-cli/src/main.rs 14.42% <0.00%> (+9.37%) ⬆️
crates/pop-telemetry/src/lib.rs 84.84% <84.61%> (+1.51%) ⬆️

... and 3 files with indirect coverage changes

@evilrobot-01
Copy link
Contributor

Can we do the same with the standardised CI environment variable? I believe it is simply something like CI=true but please kindly check.

@peterwht
Copy link
Contributor Author

Can we do the same with the standardised CI environment variable? I believe it is simply something like CI=true but please kindly check.

Great idea. CI=true is correct. Will add in

@peterwht peterwht changed the title feat(telemetry): support DO_NOT_TRACK telemetry feat(telemetry): support DO_NOT_TRACK and CI env variables to disable telemetry May 13, 2024
@peterwht
Copy link
Contributor Author

Unit test CI is likely failing due to CI=true in GitHub which now disables telemetry.

@peterwht peterwht requested a review from AlexD10S May 13, 2024 06:24
* test: propagate errors

* test: override telemetry opt-out when mocked

* docs: adjust formatting

* refactor: dry

* test: remove ignore attribute
@peterwht peterwht merged commit 681e6ed into main May 13, 2024
13 checks passed
@peterwht peterwht deleted the peter/feat-telemetry-opt-out branch May 13, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants