mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-25 17:55:23 -04:00
Revert "add sentry to investigate 500 errors"
This reverts commit 8f946d50d8f5b8252f39f277ab5d538e4fc98d8e.
This commit is contained in:
parent
3804298210
commit
377db1adcb
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,6 +34,3 @@ yarn.lock
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# Sentry Config File
|
||||
.env.sentry-build-plugin
|
||||
|
@ -1,23 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import NextError from "next/error";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
|
||||
useEffect(() => {
|
||||
Sentry.captureException(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
{/* `NextError` is the default Next.js error page component. Its type
|
||||
definition requires a `statusCode` prop. However, since the App Router
|
||||
does not expose status codes for errors, we simply pass 0 to render a
|
||||
generic error message. */}
|
||||
<NextError statusCode={0} />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
export const onRequestError = Sentry.captureRequestError;
|
@ -19,7 +19,5 @@ export function middleware(request: NextRequest) {
|
||||
|
||||
export const config = {
|
||||
// save compute time by skipping middleware for static and metadata files
|
||||
matcher: [
|
||||
"/((?!_next/static|_next/image|_vercel|_instrument|favicon.ico|sitemap.xml|robots.txt|manifest.webmanifest).*)",
|
||||
],
|
||||
matcher: ["/((?!_next/static|_next/image|_vercel|static|favicon.ico).*)"],
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
import type { NextConfig } from "next";
|
||||
import createMDX from "@next/mdx";
|
||||
import createBundleAnalyzer from "@next/bundle-analyzer";
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
import * as mdxPlugins from "./lib/helpers/remark-rehype-plugins";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
@ -159,17 +158,4 @@ const withMDX = createMDX({
|
||||
},
|
||||
});
|
||||
|
||||
export default withSentryConfig(withBundleAnalyzer(withMDX(nextConfig)), {
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/build/
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
silent: !process.env.CI,
|
||||
widenClientFileUpload: true,
|
||||
autoInstrumentAppDirectory: true,
|
||||
autoInstrumentMiddleware: false,
|
||||
autoInstrumentServerFunctions: true,
|
||||
tunnelRoute: "/_instrument/",
|
||||
disableLogger: true,
|
||||
automaticVercelMonitors: true,
|
||||
telemetry: false,
|
||||
});
|
||||
export default withBundleAnalyzer(withMDX(nextConfig));
|
||||
|
@ -28,7 +28,6 @@
|
||||
"@octokit/graphql-schema": "^15.26.0",
|
||||
"@prisma/client": "^6.4.1",
|
||||
"@react-spring/web": "^9.7.5",
|
||||
"@sentry/nextjs": "^9.4.0",
|
||||
"@vercel/analytics": "^1.5.0",
|
||||
"clsx": "^2.1.1",
|
||||
"comma-number": "^2.1.0",
|
||||
@ -122,7 +121,6 @@
|
||||
"onlyBuiltDependencies": [
|
||||
"@prisma/client",
|
||||
"@prisma/engines",
|
||||
"@sentry/cli",
|
||||
"esbuild",
|
||||
"prisma",
|
||||
"sharp",
|
||||
|
1929
pnpm-lock.yaml
generated
1929
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,11 +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 * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV,
|
||||
tracesSampleRate: 1,
|
||||
});
|
@ -1,12 +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 * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV,
|
||||
tracesSampleRate: 1,
|
||||
});
|
@ -1,12 +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 || process.env.SENTRY_DSN,
|
||||
environment: process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV,
|
||||
tracesSampleRate: 1,
|
||||
integrations: [Sentry.prismaIntegration()],
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user