chore: misc update

This commit is contained in:
Jessica Boezwinkle
2023-06-23 16:49:40 +01:00
parent e41515564b
commit 607d345eb2
2 changed files with 46 additions and 47 deletions

View File

@@ -40,7 +40,7 @@ export default config;
### Data Source Name (DSN) and where to find it ### Data Source Name (DSN) and where to find it
- `dsn` : string[] | required - `dsn` : string | required
Sentry automatically assigns a DSN when you create a project, the unique DSN informs Sentry where to send events so they are associated with the correct project. Sentry automatically assigns a DSN when you create a project, the unique DSN informs Sentry where to send events so they are associated with the correct project.

View File

@@ -9,7 +9,8 @@ import type { PluginOptions } from './types'
export const startSentry = (pluginOptions: PluginOptions): void => { export const startSentry = (pluginOptions: PluginOptions): void => {
const { dsn, options } = pluginOptions const { dsn, options } = pluginOptions
if (dsn) if (!dsn) return
try { try {
const app = express() const app = express()
@@ -24,9 +25,7 @@ export const startSentry = (pluginOptions: PluginOptions): void => {
], ],
}) })
app.use( app.use(Sentry.Handlers.requestHandler(options?.requestHandler || {}) as express.RequestHandler)
Sentry.Handlers.requestHandler(options?.requestHandler || {}) as express.RequestHandler,
)
app.use(Sentry.Handlers.tracingHandler()) app.use(Sentry.Handlers.tracingHandler())
app.use( app.use(