Describe Diagnostics (#276)

Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
This commit is contained in:
Graham Christensen 2023-02-27 10:49:40 -05:00 committed by GitHub
parent f9f927840d
commit d20c0b9746
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 5 deletions

View file

@ -293,4 +293,31 @@ nix build github:DeterminateSystems/nix-installer#nix-installer.doc
firefox result-doc/nix-installer/index.html firefox result-doc/nix-installer/index.html
``` ```
## Diagnostics
The goal of the Determinate Nix Installer is to successfully and correctly install Nix.
The `curl | sh` pipeline and the installer collects a little bit of diagnostic information to help us make that true.
Here is a table of the [diagnostic data we collect][diagnosticdata]:
| Field | Use |
| --------------------- | ----------------------------------------------------------------------------------------------------- |
| `version` | The version of the Determinate Nix Installer. |
| `planner` | The method of installing Nix (`linux`, `macos`, `steam-deck`) |
| `configured_settings` | The names of planner settings which were changed from their default. Does _not_ include the values. |
| `os_name` | The running operating system. |
| `os_version` | The version of the operating system. |
| `triple` | The architecture/operating system/binary format of your system. |
| `is_ci` | Whether the installer is being used in CI (e.g. GitHub Actions). |
| `action` | Either `Install` or `Uninstall`. |
| `status` | One of `Success`, `Failure`, `Pending`, or `Cancelled`. |
| `failure_variant` | A high level description of what the failure was, if any. For example: `Command` if a command failed. |
To disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=""` or setting `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT=""`.
You can read the full privacy policy for [Determinate Systems][detsys], the creators of the Determinate Nix Installer, [here][privacy].
[detsys]: https://determinate.systems/
[diagnosticdata]: https://github.com/DeterminateSystems/nix-installer/blob/f9f927840d532b71f41670382a30cfcbea2d8a35/src/diagnostics.rs#L29-L43
[privacy]: https://determinate.systems/privacy
[systemd]: https://systemd.io [systemd]: https://systemd.io

View file

@ -211,12 +211,14 @@ pub struct CommonSettings {
/// { /// {
/// "version": "0.4.0", /// "version": "0.4.0",
/// "planner": "linux", /// "planner": "linux",
/// "configured-settings": [ "modify_profile" ], /// "configured_settings": [ "modify_profile" ],
/// "os-name": "Ubuntu", /// "os_name": "Ubuntu",
/// "os-version": "22.04.1 LTS (Jammy Jellyfish)", /// "os_version": "22.04.1 LTS (Jammy Jellyfish)",
/// "triple": "x86_64-unknown-linux-gnu", /// "triple": "x86_64-unknown-linux-gnu",
/// "is_ci": false,
/// "action": "Install", /// "action": "Install",
/// "status": "Success" /// "status": "Failure",
/// "failure_variant": "Symlink"
/// } /// }
/// ///
/// To disable diagnostic reporting, unset the default with `--diagnostic-endpoint=` /// To disable diagnostic reporting, unset the default with `--diagnostic-endpoint=`