perf: remove sentry (#8334)
This commit is contained in:
parent
a0355e276d
commit
493efabd2e
|
@ -160,9 +160,6 @@ CLOSECOM_API_KEY=
|
||||||
# Sendgrid internal sync service
|
# Sendgrid internal sync service
|
||||||
SENDGRID_SYNC_API_KEY=
|
SENDGRID_SYNC_API_KEY=
|
||||||
|
|
||||||
# Sentry
|
|
||||||
NEXT_PUBLIC_SENTRY_DSN=
|
|
||||||
SENTRY_IGNORE_API_RESOLUTION_ERROR=
|
|
||||||
|
|
||||||
# Change your Brand
|
# Change your Brand
|
||||||
NEXT_PUBLIC_APP_NAME="Cal.com"
|
NEXT_PUBLIC_APP_NAME="Cal.com"
|
||||||
|
|
|
@ -68,5 +68,3 @@ public/embed
|
||||||
|
|
||||||
# Copied app-store images
|
# Copied app-store images
|
||||||
public/app-store
|
public/app-store
|
||||||
# Sentry
|
|
||||||
.sentryclirc
|
|
||||||
|
|
|
@ -13,9 +13,6 @@ function getCspPolicy(nonce: string) {
|
||||||
// We can remove 'unsafe-inline' from style-src when we add nonces to all style tags
|
// We can remove 'unsafe-inline' from style-src when we add nonces to all style tags
|
||||||
// Maybe see how @next-safe/middleware does it if it's supported.
|
// Maybe see how @next-safe/middleware does it if it's supported.
|
||||||
const useNonStrictPolicy = CSP_POLICY === "non-strict";
|
const useNonStrictPolicy = CSP_POLICY === "non-strict";
|
||||||
const SENTRY_ENDPOINT = process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
||||||
? new URL(process.env.NEXT_PUBLIC_SENTRY_DSN, "http://base_url").origin
|
|
||||||
: "";
|
|
||||||
|
|
||||||
// We add WEBAPP_URL to img-src because of booking pages, which end up loading images from app.cal.com on cal.com
|
// We add WEBAPP_URL to img-src because of booking pages, which end up loading images from app.cal.com on cal.com
|
||||||
// FIXME: Write a layer to extract out EventType Analytics tracking endpoints and add them to img-src or connect-src as needed. e.g. fathom, Google Analytics and others
|
// FIXME: Write a layer to extract out EventType Analytics tracking endpoints and add them to img-src or connect-src as needed. e.g. fathom, Google Analytics and others
|
||||||
|
@ -36,7 +33,7 @@ function getCspPolicy(nonce: string) {
|
||||||
} app.cal.com;
|
} app.cal.com;
|
||||||
font-src 'self';
|
font-src 'self';
|
||||||
img-src 'self' ${WEBAPP_URL} https://www.gravatar.com https://img.youtube.com https://eu.ui-avatars.com/api/ data:;
|
img-src 'self' ${WEBAPP_URL} https://www.gravatar.com https://img.youtube.com https://eu.ui-avatars.com/api/ data:;
|
||||||
connect-src 'self' ${SENTRY_ENDPOINT}
|
connect-src 'self'
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
require("dotenv").config({ path: "../../.env" });
|
require("dotenv").config({ path: "../../.env" });
|
||||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
const { withSentryConfig } = require("@sentry/nextjs");
|
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
|
|
||||||
const { withAxiom } = require("next-axiom");
|
const { withAxiom } = require("next-axiom");
|
||||||
|
@ -318,21 +317,4 @@ const nextConfig = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const sentryWebpackPluginOptions = {
|
module.exports = () => plugins.reduce((acc, next) => next(acc), nextConfig);
|
||||||
silent: true, // Suppresses all logs
|
|
||||||
};
|
|
||||||
|
|
||||||
const moduleExports = () => plugins.reduce((acc, next) => next(acc), nextConfig);
|
|
||||||
|
|
||||||
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
|
||||||
nextConfig.sentry = {
|
|
||||||
hideSourceMaps: true,
|
|
||||||
// Prevents Sentry from running on this Edge function, where Sentry doesn't work yet (build whould crash the api route).
|
|
||||||
excludeServerRoutes: [/\/api\/social\/og\/image\/?/],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sentry should be the last thing to export to catch everything right
|
|
||||||
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
||||||
? withSentryConfig(moduleExports, sentryWebpackPluginOptions)
|
|
||||||
: moduleExports;
|
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
"@radix-ui/react-switch": "^1.0.0",
|
"@radix-ui/react-switch": "^1.0.0",
|
||||||
"@radix-ui/react-toggle-group": "^1.0.0",
|
"@radix-ui/react-toggle-group": "^1.0.0",
|
||||||
"@radix-ui/react-tooltip": "^1.0.0",
|
"@radix-ui/react-tooltip": "^1.0.0",
|
||||||
"@sentry/nextjs": "^7.20.0",
|
|
||||||
"@stripe/react-stripe-js": "^1.10.0",
|
"@stripe/react-stripe-js": "^1.10.0",
|
||||||
"@stripe/stripe-js": "^1.35.0",
|
"@stripe/stripe-js": "^1.35.0",
|
||||||
"@tanstack/react-query": "^4.3.9",
|
"@tanstack/react-query": "^4.3.9",
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
* Typescript class based component for custom-error
|
* Typescript class based component for custom-error
|
||||||
* @link https://nextjs.org/docs/advanced-features/custom-error-page
|
* @link https://nextjs.org/docs/advanced-features/custom-error-page
|
||||||
*/
|
*/
|
||||||
import * as Sentry from "@sentry/nextjs";
|
|
||||||
import type { NextPage, NextPageContext } from "next";
|
import type { NextPage, NextPageContext } from "next";
|
||||||
import type { ErrorProps } from "next/error";
|
import type { ErrorProps } from "next/error";
|
||||||
import NextError from "next/error";
|
import NextError from "next/error";
|
||||||
|
@ -50,7 +49,6 @@ const CustomError: NextPage<CustomErrorProps> = (props) => {
|
||||||
*/
|
*/
|
||||||
CustomError.getInitialProps = async (ctx: AugmentedNextPageContext) => {
|
CustomError.getInitialProps = async (ctx: AugmentedNextPageContext) => {
|
||||||
const { res, err, asPath } = ctx;
|
const { res, err, asPath } = ctx;
|
||||||
await Sentry.captureUnderscoreErrorException(ctx);
|
|
||||||
const errorInitialProps = (await NextError.getInitialProps({
|
const errorInitialProps = (await NextError.getInitialProps({
|
||||||
res,
|
res,
|
||||||
err,
|
err,
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
// This file configures the initialization of Sentry on the browser.
|
|
||||||
// The config you add here will be used whenever a page is visited.
|
|
||||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
||||||
import * as Sentry from "@sentry/nextjs";
|
|
||||||
|
|
||||||
const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: SENTRY_DSN,
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
// ...
|
|
||||||
// Note: if you want to override the automatic release value, do not set a
|
|
||||||
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
|
||||||
// that it will also get attached to your source maps
|
|
||||||
});
|
|
|
@ -1,3 +0,0 @@
|
||||||
defaults.url=https://sentry.io/
|
|
||||||
defaults.org=calcom
|
|
||||||
defaults.project=cal
|
|
|
@ -1,16 +0,0 @@
|
||||||
// This file configures the initialization of Sentry on the server.
|
|
||||||
// The config you add here will be used whenever the server handles a request.
|
|
||||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
||||||
import * as Sentry from "@sentry/nextjs";
|
|
||||||
|
|
||||||
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: SENTRY_DSN,
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
// ...
|
|
||||||
// Note: if you want to override the automatic release value, do not set a
|
|
||||||
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
|
||||||
// that it will also get attached to your source maps
|
|
||||||
});
|
|
|
@ -66,7 +66,7 @@ export const ConfirmDialog = (props: IConfirmDialogWipe) => {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showToast(t("unexpected_error_try_again"), "error");
|
showToast(t("unexpected_error_try_again"), "error");
|
||||||
// @TODO: notify sentry
|
// @TODO: notify
|
||||||
}
|
}
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
},
|
},
|
||||||
|
|
|
@ -221,7 +221,6 @@
|
||||||
"NEXT_PUBLIC_MINUTES_TO_BOOK",
|
"NEXT_PUBLIC_MINUTES_TO_BOOK",
|
||||||
"NEXT_PUBLIC_SENDER_ID",
|
"NEXT_PUBLIC_SENDER_ID",
|
||||||
"NEXT_PUBLIC_SENDGRID_SENDER_NAME",
|
"NEXT_PUBLIC_SENDGRID_SENDER_NAME",
|
||||||
"NEXT_PUBLIC_SENTRY_DSN",
|
|
||||||
"NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID",
|
"NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID",
|
||||||
"NEXT_PUBLIC_STRIPE_PRICING_TABLE_PUBLISHABLE_KEY",
|
"NEXT_PUBLIC_STRIPE_PRICING_TABLE_PUBLISHABLE_KEY",
|
||||||
"NEXT_PUBLIC_SUPPORT_MAIL_ADDRESS",
|
"NEXT_PUBLIC_SUPPORT_MAIL_ADDRESS",
|
||||||
|
@ -250,7 +249,6 @@
|
||||||
"SENDGRID_API_KEY",
|
"SENDGRID_API_KEY",
|
||||||
"SENDGRID_EMAIL",
|
"SENDGRID_EMAIL",
|
||||||
"SENDGRID_SYNC_API_KEY",
|
"SENDGRID_SYNC_API_KEY",
|
||||||
"SENTRY_DSN",
|
|
||||||
"SLACK_CLIENT_ID",
|
"SLACK_CLIENT_ID",
|
||||||
"SLACK_CLIENT_SECRET",
|
"SLACK_CLIENT_SECRET",
|
||||||
"SLACK_SIGNING_SECRET",
|
"SLACK_SIGNING_SECRET",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user