Skip to content

Commit

Permalink
feat: add sentry integration #87
Browse files Browse the repository at this point in the history
  • Loading branch information
Griko Nibras authored Nov 7, 2023
2 parents bcc3231 + a45b032 commit 337c577
Show file tree
Hide file tree
Showing 7 changed files with 843 additions and 56 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ next-env.d.ts
/test-results/
/playwright-report/
/playwright/.cache/

# Sentry Config File
.sentryclirc
36 changes: 34 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/** @type {import('next').NextConfig} */
/* eslint-disable @typescript-eslint/no-var-requires */

const nextConfig = {
/**
* @type {import('next').NextConfig}
* @see https://nextjs.org/docs/pages/api-reference/next-config-js
*/
let nextConfig = {
productionBrowserSourceMaps: true,
rewrites: async () => {
return [
Expand Down Expand Up @@ -36,4 +40,32 @@ const nextConfig = {
: [],
};

/** @see https://docs.sentry.io/platforms/javascript/guides/nextjs */
const { withSentryConfig } = require("@sentry/nextjs");

/**
* @type {Partial<import('@sentry/nextjs').SentryWebpackPluginOptions>}
* @see https://github.com/getsentry/sentry-webpack-plugin#options
*/
const sentryWebpackConfig = {
org: "skip-protocol",
project: "ibc-dot-fun",
silent: true,
};

/**
* @type {import('@sentry/nextjs/types/config/types').UserSentryOptions}
* @see https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
*/
const sentryOptions = {
disableLogger: true,
hideSourceMaps: false,
transpileClientSDK: true,
tunnelRoute: "/monitoring",
widenClientFileUpload: true,
};

/** @see https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup */
nextConfig = withSentryConfig(nextConfig, sentryWebpackConfig, sentryOptions);

module.exports = nextConfig;
Loading

0 comments on commit 337c577

Please sign in to comment.