Skip to content

Commit

Permalink
update telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-shaw committed Nov 22, 2019
1 parent 4984408 commit 0a0440c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 20 deletions.
9 changes: 2 additions & 7 deletions docs/about/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ For more information about how Microsoft protects your privacy, see https://priv

## Scope

We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. Telemetry is collected when using any of the `vcpkg` commands, such as:

```
vcpkg install
vcpkg build
```
We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. Telemetry is collected when using any of the `vcpkg` commands.

## How to opt out

Expand All @@ -27,7 +22,7 @@ vcpkg displays text similar to the following when you build vcpkg. This is how M
```
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by adding -disableMetrics after the bootstrap-vcpkg script.
vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics.
Read more about vcpkg telemetry at docs/about/privacy.md
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ Write-Host "`nBuilding vcpkg.exe... done.`n"
Write-Host @"
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by adding -disableMetrics after the bootstrap-vcpkg.bat script.
vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by re-running bootstrap-vcpkg.bat with -disableMetrics.
Read more about vcpkg telemetry at docs/about/privacy.md
"@
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,6 @@ cp "$buildDir/vcpkg" "$vcpkgRootDir/"

echo "Telemetry"
echo "---------"
echo "vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by adding -disableMetrics after the bootstrap-vcpkg.sh script."
echo "vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by re-running bootstrap-vcpkg.sh with -disableMetrics"
echo "Read more about vcpkg telemetry at docs/about/privacy.md"
echo ""
2 changes: 1 addition & 1 deletion toolsrc/src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ namespace vcpkg::Build
locked_metrics->track_buildtime(Hash::get_string_hash(spec.to_string(), Hash::Algorithm::Sha256) + ":[" +
Strings::join(",",
config.feature_list,
[](std::string feature) {
[](const std::string& feature) {
return Hash::get_string_hash(feature,
Hash::Algorithm::Sha256);
}) +
Expand Down
2 changes: 1 addition & 1 deletion toolsrc/src/vcpkg/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ namespace vcpkg::Install
Checks::unreachable(VCPKG_LINE_INFO);
});

Metrics::g_metrics.lock()->track_property("installplan", specs_string);
Metrics::g_metrics.lock()->track_property("installplan_1", specs_string);

Dependencies::print_plan(action_plan, is_recursive, paths.ports);

Expand Down
12 changes: 3 additions & 9 deletions toolsrc/src/vcpkg/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,9 @@ namespace vcpkg::Metrics
if (buildtime_names.size() > 0)
{
if (props_plus_buildtimes.size() > 0) props_plus_buildtimes.push_back(',');
props_plus_buildtimes.append(
Strings::format(R"("buildnames": [%s], "buildtimes": [%s])",
Strings::join(",",
buildtime_names,
[](std::string buildname) {
return to_json_string(vcpkg::Hash::get_string_hash(
buildname, Hash::Algorithm::Sha256));
}),
Strings::join(",", buildtime_times)));
props_plus_buildtimes.append(Strings::format(R"("buildnames_1": [%s], "buildtimes": [%s])",
Strings::join(",", buildtime_names, to_json_string),
Strings::join(",", buildtime_times)));
}

const std::string& session_id = get_session_id();
Expand Down

0 comments on commit 0a0440c

Please sign in to comment.