Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
feat: Sentry error tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoLin committed Apr 29, 2020
1 parent 44d159d commit 96854d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/api/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ const cookieParser = require('cookie-parser')
const user = require('./../module/user')
const config = require('./../module/config')
const cache = require('./../module/cache')
const Sentry = require('@sentry/node')

const pathPrefix = config.get('system.path')

Sentry.init({
dsn: 'https://a5df6f6888404ec492be93b7e93b5dd3@o230009.ingest.sentry.io/5217379'
})

app.use(Sentry.Handlers.requestHandler())
app.use(Sentry.Handlers.errorHandler())

app.use(cookieParser())
app.use(bodyParser.json())

Expand Down

0 comments on commit 96854d4

Please sign in to comment.