-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2183 from City-of-Helsinki/hotfix-next12
Fix Next12 builds part 1/x - Remove TS things from JS config file
- Loading branch information
Showing
1 changed file
with
21 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
import * as Sentry from "@sentry/nextjs"; | ||
import * as Sentry from '@sentry/nextjs'; | ||
import maskGDPRData from 'shared/utils/mask-gdpr-data'; | ||
|
||
export default function sentryConfig() { | ||
Sentry.init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || '', | ||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || 'development', | ||
attachStacktrace: true, | ||
maxBreadcrumbs: Number(process.env.NEXT_PUBLIC_SENTRY_MAX_BREADCRUMBS) || 100, | ||
// Adjust this value in production, or use tracesSampler for greater control | ||
// @see https://develop.sentry.dev/sdk/performance/ | ||
tracesSampleRate: 1, | ||
beforeBreadcrumb(breadcrumb: Sentry.Breadcrumb) { | ||
return { | ||
...breadcrumb, | ||
message: maskGDPRData(breadcrumb.message), | ||
data: maskGDPRData(breadcrumb.data), | ||
}; | ||
}, | ||
beforeSend(event: Sentry.Event) { | ||
return maskGDPRData(event); | ||
}, | ||
}) | ||
}; | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || '', | ||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || 'development', | ||
attachStacktrace: true, | ||
maxBreadcrumbs: | ||
Number(process.env.NEXT_PUBLIC_SENTRY_MAX_BREADCRUMBS) || 100, | ||
// Adjust this value in production, or use tracesSampler for greater control | ||
// @see https://develop.sentry.dev/sdk/performance/ | ||
tracesSampleRate: 1, | ||
beforeBreadcrumb(breadcrumb) { | ||
return { | ||
...breadcrumb, | ||
message: maskGDPRData(breadcrumb.message), | ||
data: maskGDPRData(breadcrumb.data), | ||
}; | ||
}, | ||
beforeSend(event) { | ||
return maskGDPRData(event); | ||
}, | ||
}); | ||
} |