Introduction of Sentry application monitoring and error tracking

Hey folks,

We are planning to introduce the use of the Sentry platform into KiCad.

Sentry https://sentry.io/ is open source platform to capture application events, crash dumps, and other random analytics.

Both their hosted platform (GitHub - getsentry/sentry: Sentry is cross-platform application monitoring, with a focus on error reporting.) is open source and the integrated SDK to handle crash handling in C++ is also open source on github under MIT license (GitHub - getsentry/sentry-native: Sentry SDK for C, C++ and native applications.)

Sentry has given KiCad a sponsored account to use their SaaS platform as the KiCad team does not have the manpower to maintain a self-hosted instance.

The plan going forward is:

  • The primary use in KiCad will be to capture crash reports, but in the future it could also let us gather things like performance metrics of algorithms across the wider user base.

  • The implementation will be and will remain entirely opt-in with a one time prompt on startup, and the ability to turn it off in preferences. This is to maintain privacy regulation compliance and just good manners.

  • No PII is captured, we have no need or desire for it. Only a random GUID generated for your install is used to connect crash reports. This GUID can be reset at any time by the user.

  • Your design files are never transmitted

  • To aid in avoiding PII capture, all sentry reports go to a “sentry-relay” server run on KiCad owned infrastructure, this relay serves as a proxy to communicate to the main sentry.io platform. This aids in hiding originating IP addresses but we have also turned off the storage of IP addresses in sentry

  • Additionally, the cmake variable KICAD_USE_SENTRY is being added where a value of false will disable the inclusion of the sentry sdk entirely. The current default will be off as only Windows support is tested.

  • Sentry will only store at most 1 raw crash dump (though we can turn it off entirely) for analysis. Sentry will parse out only the relevant crash details such as call stack, and stack frame and discard the rest of the crash dump.

  • This will be deployed for Windows nightly builds first

  • Data in sentry is retained for at max 90 days before it is deleted automatically. We cannot actually retain any longer as this is a universal sentry platform rule.

This solves a many years long desire of the KiCad team to capture crash dumps without user involvement and sentry offers us a very easy solution to do it and help make KiCad better for everyone.

12 Likes

Great effort!
Is the user informed about the event along with the data sent? It’s not about privacy, at least not for me and not in this case, it’s about knowing what was going on.

There are some user interface texts that have come up in the translation recently which are probably related to this.
I don’t remember the exact wording right now, but it tells about sending automatic crash report etc.

Currently not. It’s a little possible to implement however the bulk of the data is a minidump which has no way to turn into user understandable text without the debug symbols that are stored remotely (1GB per build)