From 25da717d8191c36743f0f8a25eecfa9ff6f8d195 Mon Sep 17 00:00:00 2001 From: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Date: Tue, 6 Jun 2023 16:47:50 -0700 Subject: [PATCH] Revert GitHub repo telemetry collection (#1091) We decided that while this data would be very useful to us, it isn't worth potential privacy concerns. --- include/vcpkg/metrics.h | 1 - src/vcpkg/metrics.cpp | 3 --- src/vcpkg/vcpkgcmdarguments.cpp | 12 +----------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/vcpkg/metrics.h b/include/vcpkg/metrics.h index 40a6a3cfaf..4b760750d8 100644 --- a/include/vcpkg/metrics.h +++ b/include/vcpkg/metrics.h @@ -60,7 +60,6 @@ namespace vcpkg CommandName, DeploymentKind, DetectedCiEnvironment, - GithubRepo, InstallPlan_1, ListFile, ProcessTree, diff --git a/src/vcpkg/metrics.cpp b/src/vcpkg/metrics.cpp index f68246c844..ffcc469aaf 100644 --- a/src/vcpkg/metrics.cpp +++ b/src/vcpkg/metrics.cpp @@ -133,9 +133,6 @@ namespace vcpkg {StringMetric::CommandName, "command_name", "z-preregister-telemetry"}, {StringMetric::DeploymentKind, "deployment_kind", "Git"}, {StringMetric::DetectedCiEnvironment, "detected_ci_environment", "Generic"}, - {StringMetric::GithubRepo, - "github_repo_hash", - "0000000011111111aaaaaaaabbbbbbbbccccccccddddddddeeeeeeeeffffffff"}, // spec:triplet:version,... {StringMetric::InstallPlan_1, "installplan_1", plan_example}, {StringMetric::ListFile, "listfile", "update to new format"}, diff --git a/src/vcpkg/vcpkgcmdarguments.cpp b/src/vcpkg/vcpkgcmdarguments.cpp index 028c15110d..9abe83f2a7 100644 --- a/src/vcpkg/vcpkgcmdarguments.cpp +++ b/src/vcpkg/vcpkgcmdarguments.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -685,20 +684,11 @@ namespace vcpkg void VcpkgCmdArguments::track_environment_metrics() const { - MetricsSubmission submission; if (auto ci_env = m_detected_ci_environment.get()) { Debug::println("Detected CI environment: ", *ci_env); - submission.track_string(StringMetric::DetectedCiEnvironment, *ci_env); + get_global_metrics_collector().track_string(StringMetric::DetectedCiEnvironment, *ci_env); } - - if (auto gh_repo = github_repository.get()) - { - auto gh_repo_hash = Hash::get_string_hash(*gh_repo, Hash::Algorithm::Sha256); - Debug::println("Github repo: ", gh_repo_hash); - submission.track_string(StringMetric::GithubRepo, gh_repo_hash); - } - get_global_metrics_collector().track_submission(std::move(submission)); } Optional VcpkgCmdArguments::asset_sources_template() const