fix: sentry config fixes

This commit is contained in:
sriram veeraghanta 2024-03-26 19:24:42 +05:30
parent 1c3619a4d6
commit 5235b78cb8
6 changed files with 120 additions and 113 deletions

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
require("dotenv").config({ path: ".env" }); require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs"); const { withSentryConfig } = require("@sentry/nextjs");
@ -26,8 +27,11 @@ const nextConfig = {
output: "standalone", output: "standalone",
}; };
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0")) { if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0"), 10) {
module.exports = withSentryConfig(nextConfig, { silent: true }, { hideSourceMaps: true }); module.exports = withSentryConfig(nextConfig,
{ silent: true, authToken: process.env.SENTRY_AUTH_TOKEN },
{ hideSourceMaps: true }
);
} else { } else {
module.exports = nextConfig; module.exports = nextConfig;
} }

View File

@ -22,7 +22,7 @@
"@plane/rich-text-editor": "*", "@plane/rich-text-editor": "*",
"@plane/types": "*", "@plane/types": "*",
"@plane/ui": "*", "@plane/ui": "*",
"@sentry/nextjs": "^7.85.0", "@sentry/nextjs": "^7.108.0",
"axios": "^1.3.4", "axios": "^1.3.4",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",

View File

@ -17,37 +17,25 @@
"NEXT_PUBLIC_POSTHOG_KEY", "NEXT_PUBLIC_POSTHOG_KEY",
"NEXT_PUBLIC_POSTHOG_HOST", "NEXT_PUBLIC_POSTHOG_HOST",
"NEXT_PUBLIC_POSTHOG_DEBUG", "NEXT_PUBLIC_POSTHOG_DEBUG",
"JITSU_TRACKER_ACCESS_KEY", "SENTRY_AUTH_TOKEN"
"JITSU_TRACKER_HOST"
], ],
"pipeline": { "pipeline": {
"build": { "build": {
"dependsOn": [ "dependsOn": ["^build"],
"^build" "outputs": [".next/**", "dist/**"]
],
"outputs": [
".next/**",
"dist/**"
]
}, },
"develop": { "develop": {
"cache": false, "cache": false,
"persistent": true, "persistent": true,
"dependsOn": [ "dependsOn": ["^build"]
"^build"
]
}, },
"dev": { "dev": {
"cache": false, "cache": false,
"persistent": true, "persistent": true,
"dependsOn": [ "dependsOn": ["^build"]
"^build"
]
}, },
"test": { "test": {
"dependsOn": [ "dependsOn": ["^build"],
"^build"
],
"outputs": [] "outputs": []
}, },
"lint": { "lint": {

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
require("dotenv").config({ path: ".env" }); require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs"); const { withSentryConfig } = require("@sentry/nextjs");
@ -24,8 +25,11 @@ const nextConfig = {
output: "standalone", output: "standalone",
}; };
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0")) { if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0"), 10) {
module.exports = withSentryConfig(nextConfig, { silent: true }, { hideSourceMaps: true }); module.exports = withSentryConfig(nextConfig,
{ silent: true, authToken: process.env.SENTRY_AUTH_TOKEN },
{ hideSourceMaps: true }
);
} else { } else {
module.exports = nextConfig; module.exports = nextConfig;
} }

View File

@ -28,7 +28,7 @@
"@plane/types": "*", "@plane/types": "*",
"@plane/ui": "*", "@plane/ui": "*",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"@sentry/nextjs": "^7.85.0", "@sentry/nextjs": "^7.108.0",
"axios": "^1.1.3", "axios": "^1.1.3",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"cmdk": "^0.2.0", "cmdk": "^0.2.0",

189
yarn.lock
View File

@ -2149,35 +2149,46 @@
dependencies: dependencies:
"@daybrush/utils" "^1.4.0" "@daybrush/utils" "^1.4.0"
"@sentry-internal/feedback@7.91.0": "@sentry-internal/feedback@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.91.0.tgz#be09e5aec2959fcf503e2cf78496d5e2d263bc5a" resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.108.0.tgz#7033352abd304f1383ec47640e056a0dfd5132b7"
integrity sha512-SJKTSaz68F5YIwF79EttBm915M2LnacgZMYRnRumyTmMKnebGhYQLwWbZdpaDvOa1U18dgRajDX8Qed/8A3tXw== integrity sha512-8JcgZEnk1uWrXJhsd3iRvFtEiVeaWOEhN0NZwhwQXHfvODqep6JtrkY1yCIyxbpA37aZmrPc2JhyotRERGfUjg==
dependencies: dependencies:
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry-internal/tracing@7.91.0": "@sentry-internal/replay-canvas@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.91.0.tgz#fbb6e1e3383e1eeee08633384e004da73ac1c37d" resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.108.0.tgz#641133c19c0e1c423617b8d791f53d6cd0b0a862"
integrity sha512-JH5y6gs6BS0its7WF2DhySu7nkhPDfZcdpAXldxzIlJpqFkuwQKLU5nkYJpiIyZz1NHYYtW5aum2bV2oCOdDRA== integrity sha512-R5tvjGqWUV5vSk0N1eBgVW7wIADinrkfDEBZ9FyKP2mXHBobsyNGt30heJDEqYmVqluRqjU2NuIRapsnnrpGnA==
dependencies: dependencies:
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/replay" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.108.0"
"@sentry/browser@7.91.0": "@sentry-internal/tracing@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.91.0.tgz#de3b9ae3ca7716a35cfabc97ac376944a67e6e34" resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.108.0.tgz#d1e660701fb860cfae72b6ebfa8fb267533421fa"
integrity sha512-lJv3x/xekzC/biiyAsVCioq2XnKNOZhI6jY3ZzLJZClYV8eKRi7D3KCsHRvMiCdGak1d/6sVp8F4NYY+YiWy1Q== integrity sha512-zuK5XsTsb+U+hgn3SPetYDAogrXsM16U/LLoMW7+TlC6UjlHGYQvmX3o+M2vntejoU1QZS8m1bCAZSMWEypAEw==
dependencies: dependencies:
"@sentry-internal/feedback" "7.91.0" "@sentry/core" "7.108.0"
"@sentry-internal/tracing" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/core" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry/replay" "7.91.0"
"@sentry/types" "7.91.0" "@sentry/browser@7.108.0":
"@sentry/utils" "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.108.0.tgz#b95810bb6572b63781f253615896f5afb1a3a5c0"
integrity sha512-FNpzsdTvGvdHJMUelqEouUXMZU7jC+dpN7CdT6IoHVVFEkoAgrjMVUhXZoQ/dmCkdKWHmFSQhJ8Fm6V+e9Aq0A==
dependencies:
"@sentry-internal/feedback" "7.108.0"
"@sentry-internal/replay-canvas" "7.108.0"
"@sentry-internal/tracing" "7.108.0"
"@sentry/core" "7.108.0"
"@sentry/replay" "7.108.0"
"@sentry/types" "7.108.0"
"@sentry/utils" "7.108.0"
"@sentry/cli@^1.77.1": "@sentry/cli@^1.77.1":
version "1.77.1" version "1.77.1"
@ -2191,95 +2202,95 @@
proxy-from-env "^1.1.0" proxy-from-env "^1.1.0"
which "^2.0.2" which "^2.0.2"
"@sentry/core@7.91.0": "@sentry/core@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.91.0.tgz#229334d7f03dd5d90a17495e61ce4215ab730b2a" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.108.0.tgz#a27e8d6f85f59c5730ce86071474f15ac899fde0"
integrity sha512-tu+gYq4JrTdrR+YSh5IVHF0fJi/Pi9y0HZ5H9HnYy+UMcXIotxf6hIEaC6ZKGeLWkGXffz2gKpQLe/g6vy/lPA== integrity sha512-I/VNZCFgLASxHZaD0EtxZRM34WG9w2gozqgrKGNMzAymwmQ3K9g/1qmBy4e6iS3YRptb7J5UhQkZQHrcwBbjWQ==
dependencies: dependencies:
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry/integrations@7.91.0": "@sentry/integrations@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.91.0.tgz#b0496c9e404783bc433b1d2464d8f9aa180ebc8e" resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.108.0.tgz#307c61966208f2a126c1a93e712277c8f86a3d3c"
integrity sha512-LGRfb+WfG3FaWHtDnJIhtupweat0imCQr2z/5SSbQKzqxHhtlaEU+9IExBmBdzq90n4lRBaVQHA3zGuU02uOhg== integrity sha512-b/WbK1f3x2rQ4aJJSA4VSwpBXrXFm1Nzrca3Y9qW0MI1wjZEYsDDrh9m6ulLdVBl4YDc2VqYp1COwU/NjuHlog==
dependencies: dependencies:
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
localforage "^1.8.1" localforage "^1.8.1"
"@sentry/nextjs@^7.85.0": "@sentry/nextjs@^7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.91.0.tgz#42eb3af10ff230e8a3fe9f0e50cdbac94b7d290e" resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.108.0.tgz#31d903d75bbf4b4530046360daff4d51dcf62f53"
integrity sha512-wE83+OTEH4yYnDrhMw9eVEARSfZc6xY5qJb9xyYm5rW3+gVjNQZQaUY+wkM61Xdo0T35BN+7U4T88HbwzGeMqA== integrity sha512-etBrMSLRbNAzozetBeL6D+lR9lRAyHmV7NUBGCX9lQvgmcdxkQa15EX8pIKjsMejZ8xAZNsqYVIByIs67A77rg==
dependencies: dependencies:
"@rollup/plugin-commonjs" "24.0.0" "@rollup/plugin-commonjs" "24.0.0"
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/integrations" "7.91.0" "@sentry/integrations" "7.108.0"
"@sentry/node" "7.91.0" "@sentry/node" "7.108.0"
"@sentry/react" "7.91.0" "@sentry/react" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry/vercel-edge" "7.91.0" "@sentry/vercel-edge" "7.108.0"
"@sentry/webpack-plugin" "1.21.0" "@sentry/webpack-plugin" "1.21.0"
chalk "3.0.0" chalk "3.0.0"
resolve "1.22.8" resolve "1.22.8"
rollup "2.78.0" rollup "2.78.0"
stacktrace-parser "^0.1.10" stacktrace-parser "^0.1.10"
"@sentry/node@7.91.0": "@sentry/node@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.91.0.tgz#26bf13c3daf988f9725afd1a3cc38ba2ff90d62a" resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.108.0.tgz#ed113dc1d39aaae32f7e9f681dcea41cf28eb5f1"
integrity sha512-hTIfSQxD7L+AKIqyjoq8CWBRkEQrrMZmA3GSZgPI5JFWBHgO0HBo5TH/8TU81oEJh6kqqHAl2ObMhmcnaFqlzg== integrity sha512-pMxc9txnDDkU4Z8k2Uw/DPSLPehNtWV3mjJ3+my0AMORGYrXLkJI93tddlE5z/7k+GEJdj1HsOLgxUN0OU+HGA==
dependencies: dependencies:
"@sentry-internal/tracing" "7.91.0" "@sentry-internal/tracing" "7.108.0"
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
https-proxy-agent "^5.0.0"
"@sentry/react@7.91.0": "@sentry/react@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.91.0.tgz#620e6ce9452af025d2cc1b2eca3dd1dd730dc439" resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.108.0.tgz#26a50324f6d7a9576f3753c099e7bcd8def94f3c"
integrity sha512-7JH2rWaX3WKHHvBcZQ4f/KnkYIXTf7hMojRFncUwPocdtDlhJw/JUvjAYNpEysixXIgsMes3B32lmtZjGjRhwQ== integrity sha512-C60arh5/gtO42eMU9l34aWlKDLZUO+1j1goaEf/XRSwUcyJS9tbJrs+mT4nbKxUsEG714It2gRbfSEvh1eXmCg==
dependencies: dependencies:
"@sentry/browser" "7.91.0" "@sentry/browser" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.108.0"
hoist-non-react-statics "^3.3.2" hoist-non-react-statics "^3.3.2"
"@sentry/replay@7.91.0": "@sentry/replay@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.91.0.tgz#95077868aee3c3cc670affe13156434f858e1755" resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.108.0.tgz#baa679bd19b4e3729e607d3f84cff5048aeb3415"
integrity sha512-XwbesnLLNtaVXKtDoyBB96GxJuhGi9zy3a662Ba/McmumCnkXrMQYpQPh08U7MgkTyDRgjDwm7PXDhiKpcb03g== integrity sha512-jo8fDOzcZJclP1+4n9jUtVxTlBFT9hXwxhAMrhrt70FV/nfmCtYQMD3bzIj79nwbhUtFP6pN39JH1o7Xqt1hxQ==
dependencies: dependencies:
"@sentry-internal/tracing" "7.91.0" "@sentry-internal/tracing" "7.108.0"
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry/types@7.91.0": "@sentry/types@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.91.0.tgz#5b68954e08986fecb0d4bef168df58eef62c32c7" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.108.0.tgz#5ceb959c4dabe511fc441fec8c2465f2d624900f"
integrity sha512-bcQnb7J3P3equbCUc+sPuHog2Y47yGD2sCkzmnZBjvBT0Z1B4f36fI/5WjyZhTjLSiOdg3F2otwvikbMjmBDew== integrity sha512-bKtHITmBN3kqtqE5eVvL8mY8znM05vEodENwRpcm6TSrrBjC2RnwNWVwGstYDdHpNfFuKwC8mLY9bgMJcENo8g==
"@sentry/utils@7.91.0": "@sentry/utils@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.91.0.tgz#3b1a94c053c885877908cd3e1365e3d23e21a73f" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.108.0.tgz#0231042956aed2ef35809891592238530349dfd9"
integrity sha512-fvxjrEbk6T6Otu++Ax9ntlQ0sGRiwSC179w68aC3u26Wr30FAIRKqHTCCdc2jyWk7Gd9uWRT/cq+g8NG/8BfSg== integrity sha512-a45yEFD5qtgZaIFRAcFkG8C8lnDzn6t4LfLXuV4OafGAy/3ZAN3XN8wDnrruHkiUezSSANGsLg3bXaLW/JLvJw==
dependencies: dependencies:
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/vercel-edge@7.91.0": "@sentry/vercel-edge@7.108.0":
version "7.91.0" version "7.108.0"
resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-7.91.0.tgz#df67ee39d10570b71eccf831a181c064974d62b1" resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-7.108.0.tgz#c5ca35094bc46029ec5a72f7ee09fd3705582baa"
integrity sha512-CounqhXPwFh67zf6L/q4ACBHHqknT6YY9LdgIAnUd0GGgHzrJPyKcthvh8Je4lNdpo5LFg2gnR+6g6JS8DDYDQ== integrity sha512-dUuUEswaVIzsJnzTfaJxrvkfOowrlJxxHo2AybPDym2rob7CdaLdDJIYJa83X7QeAKMkTgLny/gYSQYC0E4UyA==
dependencies: dependencies:
"@sentry-internal/tracing" "7.91.0" "@sentry-internal/tracing" "7.108.0"
"@sentry/core" "7.91.0" "@sentry/core" "7.108.0"
"@sentry/types" "7.91.0" "@sentry/types" "7.108.0"
"@sentry/utils" "7.91.0" "@sentry/utils" "7.108.0"
"@sentry/webpack-plugin@1.21.0": "@sentry/webpack-plugin@1.21.0":
version "1.21.0" version "1.21.0"