sentry changes (#255)

This commit is contained in:
sriram veeraghanta 2023-02-08 20:44:35 +05:30 committed by GitHub
parent 166520dfda
commit bd399d6d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 36 deletions

View File

@ -1,10 +1,4 @@
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require("@sentry/nextjs");
/** @type {import('next').NextConfig} */
const path = require("path");
const nextConfig = {
@ -18,34 +12,10 @@ const nextConfig = {
],
},
output: "standalone",
experimental: {
outputFileTracingRoot: path.join(__dirname, "../../"),
transpilePackages: ["components/ui"],
},
};
module.exports = nextConfig;
// const withPWA = require("next-pwa")({
// dest: "public",
// });
// module.exports = withPWA({
// pwa: {
// dest: "public",
// register: true,
// skipWaiting: true,
// },
// reactStrictMode: false,
// swcMinify: true,
// images: {
// domains: ["vinci-web.s3.amazonaws.com"],
// },
// output: "standalone",
// experimental: {
// outputFileTracingRoot: path.join(__dirname, "../../"),
// transpilePackages: ["components/ui"],
// },
// });
module.exports = withSentryConfig(module.exports, { silent: true }, { hideSourcemaps: true });
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
module.exports = withSentryConfig(nextConfig, { silent: true }, { hideSourceMaps: true });
} else {
module.exports = nextConfig;
}

View File

@ -8,6 +8,7 @@ const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
Sentry.init({
dsn: SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...

View File

@ -8,6 +8,7 @@ const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
Sentry.init({
dsn: SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...

View File

@ -8,6 +8,7 @@ const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
Sentry.init({
dsn: SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...

View File

@ -7,7 +7,9 @@
"NEXT_PUBLIC_DOCSEARCH_API_KEY",
"NEXT_PUBLIC_DOCSEARCH_APP_ID",
"NEXT_PUBLIC_DOCSEARCH_INDEX_NAME",
"NEXT_PUBLIC_SENTRY_DSN"
"NEXT_PUBLIC_SENTRY_DSN",
"SENTRY_AUTH_TOKEN",
"NEXT_PUBLIC_SENTRY_ENVIRONMENT"
],
"pipeline": {
"build": {