fix: remove sentry from web app and build fixes
This commit is contained in:
parent
790ecee629
commit
edb68a1bc6
9 changed files with 4 additions and 129 deletions
|
|
@ -1,15 +1,8 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
// import { useEffect } from "react";
|
|
||||||
// import * as Sentry from "@sentry/nextjs";
|
|
||||||
import NextError from "next/error";
|
import NextError from "next/error";
|
||||||
|
|
||||||
// export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
|
|
||||||
export default function GlobalError() {
|
export default function GlobalError() {
|
||||||
// useEffect(() => {
|
|
||||||
// Sentry.captureException(error);
|
|
||||||
// }, [error]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import {
|
||||||
DropTargetRecord,
|
DropTargetRecord,
|
||||||
ElementDragPayload,
|
ElementDragPayload,
|
||||||
} from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
} from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
||||||
|
import { useHome } from "@/hooks/store/use-home";
|
||||||
import { WidgetItem } from "./widget-item";
|
import { WidgetItem } from "./widget-item";
|
||||||
import { getInstructionFromPayload, TargetData } from "./widget.helpers";
|
import { getInstructionFromPayload, TargetData } from "./widget.helpers";
|
||||||
import { useHome } from "@/hooks/store/use-home";
|
|
||||||
|
|
||||||
const WIDGETS_LIST = [
|
const WIDGETS_LIST = [
|
||||||
{ id: 1, title: "quick links" },
|
{ id: 1, title: "quick links" },
|
||||||
|
|
@ -13,7 +13,7 @@ const WIDGETS_LIST = [
|
||||||
{ id: 3, title: "stickies" },
|
{ id: 3, title: "stickies" },
|
||||||
];
|
];
|
||||||
export const WidgetList = ({ workspaceSlug }: { workspaceSlug: string }) => {
|
export const WidgetList = ({ workspaceSlug }: { workspaceSlug: string }) => {
|
||||||
const { reorderWidgets } = useHome();
|
const { reorderWidget } = useHome();
|
||||||
|
|
||||||
const handleDrop = (self: DropTargetRecord, source: ElementDragPayload, location: DragLocationHistory) => {
|
const handleDrop = (self: DropTargetRecord, source: ElementDragPayload, location: DragLocationHistory) => {
|
||||||
const dropTargets = location?.current?.dropTargets ?? [];
|
const dropTargets = location?.current?.dropTargets ?? [];
|
||||||
|
|
@ -30,7 +30,7 @@ export const WidgetList = ({ workspaceSlug }: { workspaceSlug: string }) => {
|
||||||
|
|
||||||
if (!sourceData.id) return;
|
if (!sourceData.id) return;
|
||||||
if (droppedId) {
|
if (droppedId) {
|
||||||
reorderWidgets(workspaceSlug, sourceData.id, droppedId, instruction); /** sequence */
|
reorderWidget(workspaceSlug, sourceData.id, droppedId, instruction); /** sequence */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
export async function register() {
|
|
||||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
|
||||||
await import("./sentry.server.config");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.NEXT_RUNTIME === "edge") {
|
|
||||||
await import("./sentry.edge.config");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* 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 path = require("path");
|
|
||||||
|
|
||||||
const { withSentryConfig } = require("@sentry/nextjs");
|
|
||||||
|
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
trailingSlash: true,
|
trailingSlash: true,
|
||||||
|
|
@ -80,39 +77,4 @@ const nextConfig = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const sentryConfig = {
|
module.exports = nextConfig;
|
||||||
// For all available options, see:
|
|
||||||
// https://github.com/getsentry/sentry-webpack-plugin#options
|
|
||||||
org: process.env.SENTRY_ORG_ID || "plane-hq",
|
|
||||||
project: process.env.SENTRY_PROJECT_ID || "plane-web",
|
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
||||||
// Only print logs for uploading source maps in CI
|
|
||||||
silent: true,
|
|
||||||
|
|
||||||
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
|
||||||
widenClientFileUpload: true,
|
|
||||||
|
|
||||||
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
|
|
||||||
// This can increase your server load as well as your hosting bill.
|
|
||||||
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
|
|
||||||
// side errors will fail.
|
|
||||||
tunnelRoute: "/monitoring",
|
|
||||||
|
|
||||||
// Hides source maps from generated client bundles
|
|
||||||
hideSourceMaps: true,
|
|
||||||
|
|
||||||
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
|
||||||
disableLogger: true,
|
|
||||||
|
|
||||||
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
|
|
||||||
// See the following for more information:
|
|
||||||
// https://docs.sentry.io/product/crons/
|
|
||||||
// https://vercel.com/docs/cron-jobs
|
|
||||||
automaticVercelMonitors: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (parseInt(process.env.SENTRY_MONITORING_ENABLED || "0", 10)) {
|
|
||||||
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
|
||||||
} else {
|
|
||||||
module.exports = nextConfig;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@
|
||||||
"@plane/utils": "*",
|
"@plane/utils": "*",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@react-pdf/renderer": "^3.4.5",
|
"@react-pdf/renderer": "^3.4.5",
|
||||||
"@sentry/nextjs": "^8.32.0",
|
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"cmdk": "^1.0.0",
|
"cmdk": "^1.0.0",
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
// This file configures the initialization of Sentry on the client.
|
|
||||||
// The config you add here will be used whenever a users loads a page in their browser.
|
|
||||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
||||||
|
|
||||||
import { replayIntegration, init } from "@sentry/nextjs";
|
|
||||||
|
|
||||||
init({
|
|
||||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
||||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
|
|
||||||
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1,
|
|
||||||
|
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
||||||
debug: false,
|
|
||||||
|
|
||||||
replaysOnErrorSampleRate: 1.0,
|
|
||||||
|
|
||||||
// This sets the sample rate to be 10%. You may want this to be 100% while
|
|
||||||
// in development and sample at a lower rate in production
|
|
||||||
replaysSessionSampleRate: 0.1,
|
|
||||||
|
|
||||||
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
|
|
||||||
integrations: [
|
|
||||||
replayIntegration({
|
|
||||||
// Additional Replay configuration goes in here, for example:
|
|
||||||
maskAllText: true,
|
|
||||||
blockAllMedia: true,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).
|
|
||||||
// The config you add here will be used whenever one of the edge features is loaded.
|
|
||||||
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
|
|
||||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
||||||
|
|
||||||
import { init } from "@sentry/nextjs";
|
|
||||||
|
|
||||||
init({
|
|
||||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
||||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
|
|
||||||
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1,
|
|
||||||
|
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
||||||
debug: false,
|
|
||||||
});
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
defaults.url=https://sentry.io/
|
|
||||||
defaults.org=plane
|
|
||||||
defaults.project=plane-web
|
|
||||||
|
|
@ -1,19 +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";
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
||||||
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT || "development",
|
|
||||||
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1,
|
|
||||||
|
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
||||||
debug: false,
|
|
||||||
|
|
||||||
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
|
||||||
// spotlight: process.env.NODE_ENV === 'development',
|
|
||||||
});
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue