Skip to content

Commit

Permalink
Revert GitHub repo telemetry collection (#1091)
Browse files Browse the repository at this point in the history
We decided that while this data would be very useful to us, it isn't worth potential privacy concerns.
  • Loading branch information
dan-shaw authored Jun 6, 2023
1 parent 52cefcc commit 25da717
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion include/vcpkg/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ namespace vcpkg
CommandName,
DeploymentKind,
DetectedCiEnvironment,
GithubRepo,
InstallPlan_1,
ListFile,
ProcessTree,
Expand Down
3 changes: 0 additions & 3 deletions src/vcpkg/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
12 changes: 1 addition & 11 deletions src/vcpkg/vcpkgcmdarguments.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <vcpkg/base/hash.h>
#include <vcpkg/base/json.h>
#include <vcpkg/base/system.debug.h>
#include <vcpkg/base/system.h>
Expand Down Expand Up @@ -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<std::string> VcpkgCmdArguments::asset_sources_template() const
Expand Down

0 comments on commit 25da717

Please sign in to comment.