Performance monitoring (#3725)

* nit

* minimal

* config

* not too big a change

* k

* update

* update web push

* node options

* k

* update config

* attempt fix
This commit is contained in:
pablonyx 2025-01-22 11:54:07 -08:00 committed by GitHub
parent f81a42b4e8
commit a215ea9143
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 662 additions and 423 deletions

View File

@ -67,6 +67,7 @@ jobs:
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
NEXT_PUBLIC_GTM_ENABLED=true
NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=true
NODE_OPTIONS=--max-old-space-size=8192
# needed due to weird interactions with the builds for different platforms
no-cache: true
labels: ${{ steps.meta.outputs.labels }}

View File

@ -60,6 +60,8 @@ jobs:
push: true
build-args: |
ONYX_VERSION=${{ github.ref_name }}
NODE_OPTIONS=--max-old-space-size=8192
# needed due to weird interactions with the builds for different platforms
no-cache: true
labels: ${{ steps.meta.outputs.labels }}

View File

@ -22,7 +22,7 @@ const cspHeader = `
/** @type {import('next').NextConfig} */
const nextConfig = {
productionBrowserSourceMaps: true,
productionBrowserSourceMaps: false,
output: "standalone",
publicRuntimeConfig: {
version,
@ -72,7 +72,7 @@ const nextConfig = {
// Sentry configuration for error monitoring:
// - Without SENTRY_AUTH_TOKEN and NEXT_PUBLIC_SENTRY_DSN: Sentry is completely disabled
// - With both configured: Only unhandled errors are captured (no performance/session tracking)
// - With both configured: Capture errors and limited performance data
// Determine if Sentry should be enabled
const sentryEnabled = Boolean(
@ -88,9 +88,11 @@ const sentryWebpackPluginOptions = {
dryRun: !sentryEnabled, // Don't upload source maps when Sentry is disabled
sourceMaps: {
include: ["./.next"],
validate: false,
ignore: ["node_modules"],
urlPrefix: "~/_next",
skip: !sentryEnabled,
stripPrefix: ["webpack://_N_E/"],
validate: true,
cleanArtifacts: true,
},
};

1059
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,8 @@
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.3",
"@sentry/nextjs": "^8.34.0",
"@sentry/nextjs": "^8.50.0",
"@sentry/tracing": "^7.120.3",
"@stripe/stripe-js": "^4.6.0",
"@types/js-cookie": "^3.0.3",
"@types/lodash": "^4.17.0",

View File

@ -3,12 +3,10 @@ import * as Sentry from "@sentry/nextjs";
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Only capture unhandled exceptions
enableTracing: false,
// Capture unhandled exceptions and performance data
enableTracing: true,
integrations: [],
tracesSampleRate: 0,
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 0,
autoSessionTracking: false,
tracesSampleRate: 0.1,
});
}