Skip to content

Manually Test Sentry integration

@greweb edited this page Jul 4, 2022 · 2 revisions

On Sentry, find the "DSN" of the project to target. It looks like this URL: https://XXX@XXX.ingest.sentry.io/XXX. This is the value you will set in the environment variable (replace _your_dsn_ placeholder).

On Desktop

export SENTRY_URL=_your_dsn_
pnpm desktop build
# For Mac:
SENTRY_SAMPLE_RATE=1 ./apps/ledger-live-desktop/dist/mac-universal/Ledger\ Live.app/Contents/MacOS/Ledger\ Live

You can then proceed to confirm that Sentry report works from the 3 different targets of Ledger Live Desktop: renderer process, main process and internal process. To do so, at any part of the app, you can literally type one of these:

CRASH_MAIN
CRASH_INTERNAL
CRASH_TEST

and it will report mocked errors to Sentry so we can test it end to end.

Screenshot 2022-06-09 at 17 11 44

On Mobile

Set in your .env these variables

FORCE_SENTRY=true
SENTRY_ENVIRONMENT=development
SENTRY_DSN=_your_dsn_

You can then proceed to testing in dev mode. To trigger a crash, you can go to Settings > Debug > Mock & Test > Debug crash and then click one crash case to test. Typically "JS Crash" works well and you will be able to easily confirm on Sentry side.

Clone this wiki locally