Skip to content

Commit

Permalink
feat: sentry implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Oct 24, 2023
1 parent 327abb3 commit 4e5f251
Show file tree
Hide file tree
Showing 9 changed files with 466 additions and 4,253 deletions.
5 changes: 4 additions & 1 deletion webapp-next/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ NODEMAILER_PORT=587
NODEMAILER_USER=user
NODEMAILER_PASSWORD=password
NODEMAILER_FROM=example@email.com
NODEMAILER_BASEURL=http://localhost:3000
NODEMAILER_BASEURL=http://localhost:3000

# SENTRY
SENTRY_AUTH_TOKEN=xxx
4 changes: 3 additions & 1 deletion webapp-next/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
# Sentry Config File
.sentryclirc
38 changes: 38 additions & 0 deletions webapp-next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,41 @@ const nextConfig = {
}

module.exports = nextConfig


// Injected content via Sentry wizard below

const { withSentryConfig } = require("@sentry/nextjs");

module.exports = withSentryConfig(
module.exports,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during build
silent: true,
org: "numericite",
project: "cm2d-nextjs",
url: "https://sentry.numericite.eu/"
},
{
// 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,
}
);
Loading

0 comments on commit 4e5f251

Please sign in to comment.