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

refactor: setup sentry #131

Merged
merged 5 commits into from
Aug 27, 2024
Merged
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ apps/
/blob-report/
/playwright/.cache/

*storybook.log
*storybook.log
# Sentry Config File
.env.sentry-build-plugin
41 changes: 40 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {withSentryConfig} from '@sentry/nextjs';
import bundleAnalyzer from '@next/bundle-analyzer';

const withBundleAnalyzer = bundleAnalyzer({
Expand All @@ -18,4 +19,42 @@ const nextConfig = {
},
};

export default withBundleAnalyzer(nextConfig);
export default withSentryConfig(withBundleAnalyzer(nextConfig), {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "jobstash",
project: "ecosystemvision",

// 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",

// Hides source maps from generated client bundles
hideSourceMaps: true,

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

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
"e2e:h:m": "npx playwright test --headed --project=chromium.mobile",
"e2e:h:t": "npx playwright test --headed --project=chromium.tablet",
"storybook": "storybook dev -p 6006",
"spotlight": "pnpx @spotlightjs/spotlight",
"build-storybook": "storybook build"
},
"dependencies": {
"@next/bundle-analyzer": "^14.2.5",
"@nextui-org/react": "^2.3.6",
"@sentry/nextjs": "^8",
"@splinetool/react-spline": "^4.0.0",
"@splinetool/runtime": "^1.9.12",
"@spotlightjs/spotlight": "^2.3.1",
"@tanstack/react-query": "^5.36.0",
"@tanstack/react-virtual": "^3.5.0",
"clsx": "^2.1.1",
Expand Down Expand Up @@ -88,4 +91,4 @@
"public"
]
}
}
}
Loading
Loading