Skip to content

Commit

Permalink
feat: added sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusschiesser committed Nov 27, 2023
1 parent f1d175a commit 86aca07
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ dev
.env

*.key
*.key.pub
*.key.pub
# Sentry Config File
.sentryclirc
29 changes: 28 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";
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
Expand All @@ -16,4 +17,30 @@ const nextConfig = {
},
};

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

// Suppresses source map uploading logs during build
silent: true,
org: "llamaindex",
project: "chat-llamaindex",
}, {
// 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,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/monitoring",

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

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7",
"@sentry/nextjs": "^7.81.1",
"@vercel/analytics": "^1.0.2",
"@vercel/blob": "^0.14.1",
"@vercel/kv": "^0.2.2",
Expand Down
Loading

0 comments on commit 86aca07

Please sign in to comment.