Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/netdata: add config option for disabling analytics #97361

Merged

Conversation

DeeUnderscore
Copy link
Contributor

Add services.netdata.enableAnalyticsReporting (default true), an option that sets a DO_NOT_TRACK environment variable to inform Netdata that it should not send usage statistics.

Motivation for this change

Netdata sends usage statistics to Google Analytics by default. There is an opt out mechanism that requires either placing a file called .opt-out-from-anonymous-statistics in Netdata's config directory, or setting the DO_NOT_TRACK environment variable; the latter seemed like the easier solution.

There is no way to opt out via the config file, so this necessitates a new option. The option defaults to true for consistency with upstream.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I checked if the systemd unit is configured with the environment variable properly, but did not try to verify whether or not Netdata actually sends or doesn't send analytics according to it.

@DeeUnderscore DeeUnderscore changed the title netdata: add config option for disabling analytics nixos/netdata: add config option for disabling analytics Sep 7, 2020
@SirFerdek
Copy link

merge. anyone? :)

Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DeeUnderscore
Copy link
Contributor Author

As a note, Netdata is now switching from Google Analytics to a self-hosted solution. This seems to apply to versions 1.29.4 and up. The current version in nixpkgs master is 1.29.3, so it would still send to Google Analytics as far as I can tell, but I'll make note of it in the option description.

Option disables analytics through the DO_NOT_TRACK environment variable,
as detailed in
https://learn.netdata.cloud/docs/agent/anonymous-statistics

Default is analytics off
@sternenseemann
Copy link
Member

@ofborg test netdata

@sternenseemann sternenseemann merged commit 5d81fcd into NixOS:master Apr 1, 2021
@sternenseemann
Copy link
Member

Sorry for the thousands of roundtrips!

@DeeUnderscore DeeUnderscore deleted the netdata-analytics-optout branch April 20, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants