Skip to content

Commit

Permalink
feat: sentry bug track
Browse files Browse the repository at this point in the history
  • Loading branch information
Angga Maulana authored and Angga Maulana committed Mar 26, 2023
1 parent 4a44030 commit b5372b7
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 8 deletions.
33 changes: 26 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
const conf = {
env: {
prefixs: process.env.PREFIXS,
},
};

module.exports = conf;
const { withSentryConfig } = require('@sentry/nextjs')

const moduleExports = {
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
// for client-side builds. (This will be the default starting in
// `@sentry/nextjs` version 8.0.0.) See
// https://webpack.js.org/configuration/devtool/ and
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// for more information.
hideSourceMaps: true,
},
env: {
prefixs: process.env.PREFIXS,
},
}

module.exports = withSentryConfig(moduleExports,{
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
})
1 change: 0 additions & 1 deletion pages/member/genealogy/diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Member from 'layouts/Member';
import dynamic from "next/dynamic";
const Organizational = dynamic(() => import("../../../components/Organizms/OrgChart/OrgChart"),{ssr: false})
export default function Diagram() {

return (
<div className="flex flex-wrap">
<div className="overflow-x-scroll w-full lg:w-12/12 px-4">
Expand Down
11 changes: 11 additions & 0 deletions sentry.client.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// sentry.client.config.js
import * as Sentry from '@sentry/nextjs';
const SENTRY_DSN = process.env.SENTRY_DSN
Sentry.init({
dsn: SENTRY_DSN,

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0
});
10 changes: 10 additions & 0 deletions sentry.edge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// sentry.client.config.js
import * as Sentry from '@sentry/nextjs';
const SENTRY_DSN = process.env.SENTRY_DSN
Sentry.init({
dsn: SENTRY_DSN,
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
11 changes: 11 additions & 0 deletions sentry.server.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// sentry.client.config.js
import * as Sentry from '@sentry/nextjs';
const SENTRY_DSN = process.env.SENTRY_DSN
Sentry.init({
dsn: SENTRY_DSN,

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});

0 comments on commit b5372b7

Please sign in to comment.