Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement sentry #178

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .env.prod.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ NEXTAUTH_URL=
GITHUB_ID=
GITHUB_SECRET=
NEXT_PUBLIC_IS_TESTNET=
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID=
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID=

NEXT_PUBLIC_SENTRY_DSN=
SENTRY_AUTH_TOKEN=
SENTRY_ORG=
SENTRY_PROJECT=
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ module.exports = {
'react/react-in-jsx-scope': 'off',
'no-void': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-var-requires': 0,
},
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ next-env.d.ts
.netlify

# environment
.env
.env
# Sentry Config File
.env.sentry-build-plugin
32 changes: 31 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
const { withSentryConfig } = require('@sentry/nextjs')

/** @type {import('next').NextConfig} */

module.exports = {
const nextConfig = {
output: 'standalone',
webpack: (config) => {
config.externals.push('encoding')
return config
},
experimental: {
instrumentationHook: true,
},
}

module.exports = withSentryConfig(nextConfig, {
// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},

// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
tunnelRoute: '/monitoring',

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
})
Loading