Skip to content

Commit

Permalink
build: replace raven with sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jul 23, 2024
1 parent 54f3a98 commit d3bb208
Show file tree
Hide file tree
Showing 6 changed files with 1,116 additions and 1,009 deletions.
7 changes: 3 additions & 4 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const sse = require('connect-sse')()
const express = require('express')
const crypto = require('crypto')
const path = require('path')
const Raven = require('raven')
const Sentry = require('@sentry/node')
const cors = require('cors')

const channelIsBanned = require('./channel-is-banned-middleware')
Expand All @@ -23,8 +23,7 @@ module.exports = (testRoute) => {
app.use(channelIsBanned)

if (process.env.SENTRY_DSN) {
Raven.config(process.env.SENTRY_DSN).install()
app.use(Raven.requestHandler())
Sentry.init({ dsn: process.env.SENTRY_DSN, integrations: [Sentry.expressIntegration()] })
}

if (process.env.FORCE_HTTPS) {
Expand Down Expand Up @@ -119,7 +118,7 @@ module.exports = (testRoute) => {
})

if (process.env.SENTRY_DSN) {
app.use(Raven.errorHandler())
Sentry.setupExpressErrorHandler(app);
}

return app
Expand Down
Loading

0 comments on commit d3bb208

Please sign in to comment.