Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
NEXT_PUBLIC_SITEMAP_DOMAIN='https://brc-analytics.dev.clevercanary.com'
NEXT_PUBLIC_BASE_PATH=''
SITEMAP_EXCLUDE='/export*,/login'
# Sentry configuration (optional - leave empty to disable)
NEXT_PUBLIC_SENTRY_DSN=''
# Suppress warning about App Router global-error.js (we use Pages Router)
SENTRY_SUPPRESS_GLOBAL_ERROR_HANDLER_FILE_WARNING=1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ backend/**/.env
venv
__pycache__

playwright-report/

## public api
/public/api

# Sentry Config File
.env.sentry-build-plugin
10 changes: 10 additions & 0 deletions instrumentation-client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
enabled: !!process.env.NEXT_PUBLIC_SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_SITE_CONFIG || "unknown",
tracesSampleRate: 1,
});

export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
16 changes: 15 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { withSentryConfig } from "@sentry/nextjs";
import nextMDX from "@next/mdx";
import withPlugins from "next-compose-plugins";
import path from "path";
Expand All @@ -13,7 +14,8 @@ const ESM_PACKAGES = [
const withMDX = nextMDX({
extension: /\.mdx?$/,
});
export default withPlugins(

const nextConfig = withPlugins(
[[withMDX, { pageExtensions: ["md", "mdx", "ts", "tsx"] }]],
{
basePath: "",
Expand Down Expand Up @@ -86,3 +88,15 @@ export default withPlugins(
},
}
);

export default withSentryConfig(nextConfig, {
disableLogger: true,
org: "galaxy",
project: "brc-analytics-dev",
sentryUrl: "https://sentry.galaxyproject.org/",
silent: true,
sourcemaps: {
disable: true,
},
suppressGlobalErrorHandlerFileWarning: true,
});
Loading
Loading