Skip to content

Commit

Permalink
Adding sentry netlify integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara authored and Sara committed Jan 11, 2025
1 parent b8c5850 commit 860cca2
Show file tree
Hide file tree
Showing 11 changed files with 1,168 additions and 277 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ env:
NEXT_PUBLIC_QUIKNODE_URL: xxxx
NEXT_PUBLIC_ALCHEMY_MAINNET_API_KEY: xxxx
HARDHAT_RPC_URL: ${{ secrets.HARDHAT_RPC_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}

jobs:
linting:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ next-env.d.ts
/playwright-report/
/blob-report/
/playwright/.cache/

# Sentry Config File
.env.sentry-build-plugin
39 changes: 39 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,42 @@ 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

org: "breadchain-cooperative",
project: "crowdstaking-app",

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

// 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,
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"@radix-ui/react-toast": "^1.1.5",
"@rainbow-me/rainbowkit": "^1.3.1",
"@safe-global/safe-apps-sdk": "^8.1.0",
"@sentry/nextjs": "^7.99.0",
"@sentry/browser": "^8.47.0",
"@sentry/nextjs": "^8.47.0",
"@sentry/react": "^7.109.0",
"@wagmi/core": "^1.4.12",
"blo": "^1.1.1",
Expand Down
Loading

0 comments on commit 860cca2

Please sign in to comment.