Add NEXT_PUBLIC_SENTRY_DSN
parent
03d66ea1b3
commit
9294150029
|
@ -4,14 +4,14 @@ import type { Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0
|
|||
export const sentry = (): Handler => {
|
||||
return async (c, next) => {
|
||||
// const sentry = new Toucan({
|
||||
// dsn: c.env.SENTRY_DSN,
|
||||
// dsn: c.env.SENTRY_DSN || || c.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
// request: c.req,
|
||||
// allowedHeaders: ['user-agent'],
|
||||
// allowedSearchParams: /(.*)/,
|
||||
// })
|
||||
|
||||
// try {
|
||||
await next()
|
||||
await next()
|
||||
// } catch (error) {
|
||||
// sentry.captureException(error)
|
||||
// }
|
||||
|
|
|
@ -4,7 +4,7 @@ import Toucan from 'toucan-js'
|
|||
export const sentry = (): Handler => {
|
||||
return async (c, next) => {
|
||||
const sentry = new Toucan({
|
||||
dsn: c.env.SENTRY_DSN,
|
||||
dsn: c.env.SENTRY_DSN || c.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
request: c.req,
|
||||
allowedHeaders: ['user-agent'],
|
||||
allowedSearchParams: /(.*)/,
|
||||
|
|
Loading…
Reference in New Issue