rsnext/packages/next-plugin-sentry/src/on-init-server.js
Joe Haddad 18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00

11 lines
459 B
JavaScript

import * as Sentry from '@sentry/node'
export default async function initServer() {
// by default `@sentry/node` is configured with defaultIntegrations
// which capture uncaughtExceptions and unhandledRejections
// see here for more https://github.com/getsentry/sentry-javascript/blob/46a02209bafcbc1603c769476ba0a1eaa450759d/packages/node/src/sdk.ts#L22
Sentry.init({
dsn: process.env.SENTRY_DSN,
release: process.env.SENTRY_RELEASE,
})
}