Introduce sentry for crash data collection
UI
There will be a one-time prompt asking to opt into data collection
Data collection can always be toggled under Preferences.
Mechanisms
Opt-in
Opt in operates by creating a sentry-opt-in file that is blank but since it's a simple file it can be checked as early as possible in application init to start sentry.
This file is stored in %LOCALAPPDATA%\KiCad\<version> on Windows and corresponding local config directories on other platforms. It is also under the versioned kicad folder meaning opt-in is per machine.
User Id
A file called sentry-uid is also created alongside sentry-opt-in containing a singular completely random generated guid.
The user id is purely for linking reports in sentry and never against a real user. No IP or other PII is ever recorded or transmitted.
The unique id can be reset at any time via button in Preferences.
The uid is automatically recreated if the sentry-uid file is missing and data collection is enabled.
Startup
Upon startup, if the sentry-opt-in file is present, sentry is initialized for the session with the user id contained in sentry-uid.
We also create a tag called kicad.version to insert out full kicad version string into.
There is a feature to denote "releases" for an application. Currently it is set so that nightly builds are all lumped into a
6.99 (KICAD_MAJOR_MINOR) release while all other releases get lumped into KICAD_SEMANTIC_VERSION. This will probably require some tweaking to ensure we don't spam releases that get autocreated in sentry.
Destination
We can opt to use Sentry as SaaS or self host our own instance. The SaaS option is attractive to reduce our infrastructure maintenance burden.
If we go with the SaaS solution, we will deploy sentry-relay on our own infrastructure which acts as a "proxy". It will remove the ability for sentry to receive the sender's IP.

