web: report server and browser errors to Bugsink

This commit is contained in:
ponas committed 2026-10-14 02:45:18 +02:00
1 parent b7e7847885
commit 6c324a48aa
10 files changed
+1685 -12

No files matched your search

+18 -1
View File
@@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */
import { withSentryConfig } from "@sentry/nextjs/config";
import path from "path";
import { fileURLToPath } from "url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -53,4 +54,20 @@ const nextConfig = {
},
};
export default nextConfig;
// Errors are reported to Bugsink (bugsink.neuf.no), which speaks Sentry's
// protocol. The build uploads source maps there when SENTRY_AUTH_TOKEN is
// set, and removes them from the output afterwards
export default withSentryConfig(nextConfig, {
sentryUrl: "https://bugsink.neuf.no/",
// Bugsink has no organisations; sentry-cli insists on a value
org: "bugsinkhasnoorgs",
project: "neuf-www",
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: !process.env.CI,
telemetry: false,
sourcemaps: { deleteSourcemapsAfterUpload: true },
// the hook it asks for is for tracing navigations, which is off
suppressOnRouterTransitionStartWarning: true,
// Bugsink only takes errors: leave the tracing code out of the bundles
bundleSizeOptimizations: { excludeDebugStatements: true, excludeTracing: true },
});