1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 01:45:25 -04:00

Revert "add sentry to investigate 500 errors"

This reverts commit 8f946d50d8f5b8252f39f277ab5d538e4fc98d8e.
This commit is contained in:
Jake Jarvis 2025-03-06 08:27:48 -05:00
parent 3804298210
commit 377db1adcb
Signed by: jake
SSH Key Fingerprint: SHA256:nCkvAjYA6XaSPUqc4TfbBQTpzr8Xj7ritg/sGInCdkc
10 changed files with 16 additions and 2009 deletions

3
.gitignore vendored
View File

@ -34,6 +34,3 @@ yarn.lock
# vercel # vercel
.vercel .vercel
# Sentry Config File
.env.sentry-build-plugin

View File

@ -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>
);
}

View File

@ -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;

View File

@ -19,7 +19,5 @@ export function middleware(request: NextRequest) {
export const config = { export const config = {
// save compute time by skipping middleware for static and metadata files // save compute time by skipping middleware for static and metadata files
matcher: [ matcher: ["/((?!_next/static|_next/image|_vercel|static|favicon.ico).*)"],
"/((?!_next/static|_next/image|_vercel|_instrument|favicon.ico|sitemap.xml|robots.txt|manifest.webmanifest).*)",
],
}; };

View File

@ -1,7 +1,6 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
import createMDX from "@next/mdx"; import createMDX from "@next/mdx";
import createBundleAnalyzer from "@next/bundle-analyzer"; import createBundleAnalyzer from "@next/bundle-analyzer";
import { withSentryConfig } from "@sentry/nextjs";
import * as mdxPlugins from "./lib/helpers/remark-rehype-plugins"; import * as mdxPlugins from "./lib/helpers/remark-rehype-plugins";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
@ -159,17 +158,4 @@ const withMDX = createMDX({
}, },
}); });
export default withSentryConfig(withBundleAnalyzer(withMDX(nextConfig)), { export default 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,
});

View File

@ -28,7 +28,6 @@
"@octokit/graphql-schema": "^15.26.0", "@octokit/graphql-schema": "^15.26.0",
"@prisma/client": "^6.4.1", "@prisma/client": "^6.4.1",
"@react-spring/web": "^9.7.5", "@react-spring/web": "^9.7.5",
"@sentry/nextjs": "^9.4.0",
"@vercel/analytics": "^1.5.0", "@vercel/analytics": "^1.5.0",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"comma-number": "^2.1.0", "comma-number": "^2.1.0",
@ -122,7 +121,6 @@
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"@prisma/client", "@prisma/client",
"@prisma/engines", "@prisma/engines",
"@sentry/cli",
"esbuild", "esbuild",
"prisma", "prisma",
"sharp", "sharp",

1929
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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()],
});