26 Commits

Author SHA1 Message Date
Shaun Jackman
5920c0b2ae setup-analytics: Handle missing /proc/.../uuid 2017-11-23 08:55:15 -08:00
Mike McQuaid
5367f1b408 analytics: remove unused analytics.
We didn't end up using the `screenview` and `exception` analytics as
much as expected so let's remove them and focus on stuff that's
formula-specific.
2017-06-07 16:34:54 +01:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
a3bffe70bc Use docs.brew.sh links. 2017-01-04 11:13:41 +00:00
William Woodruff
72b81844ed
Redirect stderr output from git (shim) invocations to /dev/null.
These invocations occur before we can actually automatically install git via
bottle, and as such their output isn't relevant.
2016-10-26 16:33:35 -04:00
Alyssa Ross
e0d39cc3ef analytics: don't report commands run by Homebrew
Fixes #788.
2016-10-01 15:18:09 +01:00
Mike McQuaid
b85ee1cb8f Update documentation links. 2016-09-20 10:41:42 +01:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Martin Afanasjew
5f4111d24a utils/analytics.sh: tweak output in debug mode
Avoid some duplication (thereby also shortening line length) and put
everything in a single string for output via `echo`.
2016-08-09 21:24:39 +02:00
Mike McQuaid
2e360112e4 analytics.*: use curl --data for readability. 2016-08-09 19:41:30 +01:00
Mike McQuaid
222b730415 analytics.*: output curl command in debug mode. 2016-08-09 19:41:30 +01:00
Martin Afanasjew
b75516425b utils/analytics.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Mike McQuaid
265c126349 analytics.sh: use full uuidgen path on OS X.
Fixes #575.
2016-07-24 16:35:57 -06:00
Martin Afanasjew
b1811f2ef3 analytics: make Linux UUID generation more robust
Not every Linux system has a pre-installed `uuidgen` command (Debian
has a package `uuid-runtime` but doesn't install it by default). In
contrast, `/proc/sys/kernel/random/uuid` is always available on a modern
Linux system and produces type/version 4 UUIDs, just like `uuidgen`.

Closes #416.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29 21:07:25 +02:00
Martin Afanasjew
271023c5e1 analytics: handle UUID generation errors
Avoid writing an empty UUID to the Git configuration file and disable
analytics temporarily to avoid sending bogus data with an invalid UUID.
2016-06-29 21:07:25 +02:00
Mike McQuaid
b7ac58b35e Don't report cask to analytics. 2016-05-04 17:50:36 +01:00
Xu Cheng
98aff27317 add brew analytics command (#173) 2016-05-01 22:04:46 +08:00
Zhiming Wang
c63400d56b analytics: relocate UUID to homebrew.analyticsuuid in .git/config
This way analytics related settings and parameters (currently
analyticsdisabled, analyticsmessage and analyticsuuid) are all kept in
the same place.

Note that in this commit we offer a path of migration: if
~/.homebrew_analytics_user_uuid already exists, read the UUID from it,
write to homebrew.analyticsuuid, and remove it.

See more detailed discussions in #145.

Closes #162.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-30 22:40:55 +02:00
Andrew Janke
05efd70dc3 Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
2016-04-26 04:28:38 -04:00
Xu Cheng
7aaaf9d8db fix setup-analytics (#154)
DO not invoke git config because HOMEBREW_NO_ANALYTICS, otherwise
it will disable analytics for everyone when running `brew update`
in following manners:
 * `brew update` will set HOMEBREW_NO_ANALYTICS because the absence of
   `homebrew.analyticsmessage`
 * `brew update-report` will set `homebrew.analyticsdisabled` because of
    HOMEBREW_NO_ANALYTICS.

Also reduce file IO.
2016-04-26 15:53:52 +08:00
Mike McQuaid
df489cfde2 More analytics tweaks.
Provide a single command that can be run to disable analytics, run it if
`HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in
that case too.

References https://github.com/Homebrew/brew/issues/142.
2016-04-25 18:51:00 -05:00
Mike McQuaid
1451553188 Ship analytics for Homebrew.
For more information and opt-out instructions please read:
https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md#analytics
2016-04-23 14:27:09 +01:00
Mike McQuaid
2671b9f55d analytics: roll tracking ID.
Someone else has been sending weird data to ours and it has bad initial
test data so let's roll it before we ship it to everyone on Saturday.
2016-04-21 08:06:12 +01:00
Mike McQuaid
f6d5ae2253 analytics: add more documentation, Linuxbrew ID. (#98) 2016-04-16 11:39:57 +01:00
Mike McQuaid
4e8c6e633c Document disabling of opt-in Homebrew analytics. (#79) 2016-04-12 12:17:56 +01:00
Mike McQuaid
0c85113053 Homebrew (opt-in) Analytics tweaks. (#57)
- add `HOMEBREW_PRODUCT` global variable
- only differentiate between `/usr/local` and `non-/usr/local` Homebrew
  prefixes to avoid sharing sensitive user information
- note if e.g. build errors are occurring under CI
- Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out
  when this is enabled for everyone)
- Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics
  that are sent
- Move Bash analytics code to `Library/Homebrew/utils/analytics.sh`
- Add documentation for our analytics and why/what/when/how and opt-out
- Only official Homebrew commands are reported
- Ruby analytics are now reported in a forked, background process
2016-04-12 11:02:22 +01:00