Crash and error reporting
Crash and error reporting sends reports about crashes and some errors in UniconOS to a Sentry project that you operate. You see the failure and the steps that led to it, instead of collecting logs from each device afterwards.
The feature needs UniconOS 2609 or later. It is off by default and sends nothing until you configure it.
Configuration
Three settings control the feature. They are in the [Global] section of /setup/terminal.ini. In Scout and
Scout Board, set them as advanced file entries, one entry per key. For how to define an entry, see
Advanced file entries.
Reporting runs only when SentryEnabled is on and SentryDsn is set. SentryEnvironment is optional:
| Key | Values | Default | Description |
|---|---|---|---|
SentryEnabled |
1 or true
|
0 |
Turns reporting on. Any other value leaves it off. |
SentryDsn |
DSN URL | Empty | Where reports are sent. Reporting stays off while this is empty. |
SentryEnvironment |
Free text | Empty | A label that groups your devices in Sentry, for example production. |
For example:
[Global]
SentryEnabled=1
SentryDsn=https://<key>@<your-sentry-host>/<project-id>
SentryEnvironment=production
<!--NeedCopy-->
Restart the device after you change a value. Reporting does not start or stop on a running device.
To turn reporting off, set SentryEnabled=0 and restart the device. Reports that are still held on the device are
discarded.
Getting a DSN
The DSN (Data Source Name) is the address of your Sentry project. Devices send their reports to it. To get it:
-
In your Sentry organization, create a project with the Native platform.
-
Open Settings > Projects > your project > Client Keys (DSN), and copy the DSN.
Note:
A DSN contains a key for sending reports to your project and is stored in plain text on the device. Treat it as a shared secret. Remove it from diagnostic files that you collect with Device diagnostics before you share them.
What is sent
Reports come from the UniconOS desktop, settings, login, and Scout agent components. They cover crashes and also some errors that do not crash the component, for example when it cannot reach the settings service.
Each report states:
- Which component failed
- The last steps it took before the failure
- The firmware version
- Your environment label
Crashes also include a crash dump, which is a copy of part of the failed process’s memory.
Reports do not include:
- User names
- The device host name
- Asset tags or serial numbers
- The names of your published applications
Note:
UniconOS removes the data listed above from reports. A crash dump or an error message can still contain other data that the process held at the time. Restrict access to your Sentry project accordingly.