Skip to content

Add setting to allow control over telemetry event writing#777

Merged
JohnMcPMS merged 4 commits into
microsoft:masterfrom
JohnMcPMS:telemoptout
Mar 5, 2021
Merged

Add setting to allow control over telemetry event writing#777
JohnMcPMS merged 4 commits into
microsoft:masterfrom
JohnMcPMS:telemoptout

Conversation

@JohnMcPMS

@JohnMcPMS JohnMcPMS commented Mar 4, 2021

Copy link
Copy Markdown
Member

Fixes #279

Change

Adds a setting to allow control over telemetry event writing.

"telemetry":
{
    "disable": true
}

When disabled, the ETW events will not be written at all.

Validation

Manually ran ETW event log listener with setting in both states; noted lack of events when disabled.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner March 4, 2021 02:12
@ghost ghost added Area-Settings Issue related to WinGet Settings Impact-Compliance Issue-Feature This is a feature request for the Windows Package Manager client. labels Mar 4, 2021
@github-actions

github-actions Bot commented Mar 4, 2021

Copy link
Copy Markdown

Misspellings found, please review:

  • datatelemetry
  • PASSTHRU
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"validator valijson valueiterator "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"datatelemetry PASSTHRU "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

Comment thread doc/Settings.md Outdated

The `telemetry` settings control whether winget writes ETW events that may be sent to Microsoft on a default installation of Windows.

Details on telemetry can be found [here](/README.md#datatelemetry), and our primary privacy statement can be found [here](/privacy.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't linkify here. See F84: Failure of Success Criterion 2.4.9 due to using a non-specific link such as "click here" or "more" without a mechanism to change the link text to specific text.

Suggested change
Details on telemetry can be found [here](/README.md#datatelemetry), and our primary privacy statement can be found [here](/privacy.md).
See [details on telemetry](../README.md#datatelemetry), and our [primary privacy statement](/privacy.md).

(And can you add the missing newline character to .github/actions/spelling/patterns.txt while you're updating this PR?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out, and yes, I will add the newline.

@yao-msft

yao-msft commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

"allOf": [

Just found out it's unnecessary use of allOf and all below ""additionalItems": true" are incorrect. "additionalItems" were for array types. We should revisit this when we do schema validation on settings file


Refers to: schemas/JSON/settings/settings.schema.0.2.json:85 in 717b4b6. [](commit_id = 717b4b6, deletion_comment = False)

@yao-msft

yao-msft commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

"allOf": [

Looks like the schema itself was not quite correct..


In reply to: 790236688 [](ancestors = 790236688)


Refers to: schemas/JSON/settings/settings.schema.0.2.json:85 in 717b4b6. [](commit_id = 717b4b6, deletion_comment = False)

using namespace std::string_view_literals;

namespace AppInstaller::Settings
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we move usings outside for this one specifically?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the using statements inside the namespace imports them into that namespace. So AppInstaller::Settings would now have definitions for sv, ms, etc.

@yao-msft yao-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@JohnMcPMS JohnMcPMS merged commit 4cd1f52 into microsoft:master Mar 5, 2021
@JohnMcPMS JohnMcPMS deleted the telemoptout branch March 5, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opt-Out of Telemetry

3 participants