chore: misc update
This commit is contained in:
@@ -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.
|
||||||
|
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user