Commit Graph

2 Commits (3be09c6d74ab3e69c99a4dfef5cac79d075b7142)

Author SHA1 Message Date
Struan Shrimpton 3be09c6d74 telemetry: Fix imports
Logging was missing from __init__.py which broke under mac. This adds
that back in and remove unused imports from other files. The os check
is also moved up to be the first thing we look for since is_google_host
does not work with mac at the moment.

Bug:326277821
Change-Id: I3f28838d367eb9583332fd33ad35d71c0851fe4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6604498
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
1 month ago
Struan Shrimpton d495580f42 Add telemetry initialization and opt out utility
This includes initializing the module which will handle printing the
notice and enabling/disabling telemetry based on config. The __main__
file also allows for the banner to have a consistent entry point for
disabling telemetry so instrumenting programs don't need to worry
about it if they are using the same default config file.

Bug: 326277821
Change-Id: I861d6b9311ed48c2e1effcac22b314b73e2641e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5901465
Reviewed-by: Terrence Reilly <treilly@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
9 months ago