Skip to content

Commit 65bd4c0

Browse files
committed
docs: use sentry logging in development environment
1 parent 17bc875 commit 65bd4c0

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ Once `.env` files is created adjust it to your needs, and update `LACE_EXTENSION
6060

6161
> If you want to develop DApp Explorer please refer to the [Setting up local connection with DApp Radar API](apps/browser-extension-wallet/src/views/browser-view/features/dapp/README.md) page
6262
63+
#### Configure Sentry for the local dev environment
64+
65+
If you want to log errors to Sentry from you local dev environment you need to provide in your `.env` file Sentry [dsn](https://docs.sentry.io/platforms/javascript/configuration/options/#dsn) and [environment](https://docs.sentry.io/platforms/javascript/configuration/options/#environment) values.
66+
```
67+
SENTRY_DSN=<SENTRY_DSN>
68+
SENTRY_ENVIRONMENT=development
69+
```
70+
To get **Sentry dsn** log in to [Sentry](https://iohk-j4.sentry.io/) and go to `Settings -> Projects -> lace-extension-v1 -> Client Keys` or click [here](https://iohk-j4.sentry.io/settings/projects/lace-extension-v1/keys/).
71+
6372
### Build packages and extension
6473

6574
```sh

apps/browser-extension-wallet/.env.defaults

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ SENTRY_AUTH_TOKEN=
7676
SENTRY_DSN=
7777
SENTRY_ORG=
7878
SENTRY_PROJECT=
79-
SENTRY_ENVIRONMENT=development
79+
SENTRY_ENVIRONMENT=
8080

8181
# Cardano Services
8282
CARDANO_SERVICES_URL_MAINNET=https://live-mainnet.lw.iog.io

apps/browser-extension-wallet/sentry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as Sentry from '@sentry/react';
22
import { v4 as uuidv4 } from 'uuid';
33
import { storage } from 'webextension-polyfill';
4+
45
Sentry.init({
56
environment: process.env.SENTRY_ENVIRONMENT,
67
dsn: process.env.SENTRY_DSN,

0 commit comments

Comments
 (0)