Log errors to Sentry (#1422)

This commit is contained in:
Marcin Mielnicki
2018-03-24 20:30:51 +01:00
committed by Thaddée Tyl
parent ea4b758612
commit fe4ac0bf1c
7 changed files with 142 additions and 7 deletions

View File

@@ -176,3 +176,26 @@ Set the `REDIRECT_URI` environment variable:
```sh
REDIRECT_URI=http://my-custom-shields.s3.amazonaws.com/
```
Sentry
------
In order to enable integration with [Sentry](https://sentry.io), you need your own [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn). Its an URL in format `https://{PUBLIC_KEY}:{SECRET_KEY}@sentry.io/{PROJECT_ID}`.
### How to obtain the Sentry DSN
1. [Sign up](https://sentry.io/pricing/) for Sentry
1. Log in to Sentry
1. Create a new project for Node.js
1. You should see [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn) for your project. Sentry DSN can be found by navigating to \[Project Name] -> Project Settings -> Client Keys (DSN) as well.
Start the server using the Sentry DSN. You can set it:
- by `SENTRY_DSN` environment variable
```
SENTRY_DSN=https://xxx:yyy@sentry.io/zzz sudo node server
```
- or by `sentry_dsn` secret property defined in `private/secret.json`
```
sudo node server
```