🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(observability): re-enable Sentry source-map upload w/ debug IDs (LFE-14423) (#15324)
Nikita Kabardin23be9a192ff2
diff --git a/web/next.config.mjs b/web/next.config.mjsindex 840e43f1e6..9ca0da3d72 100644--- a/web/next.config.mjs+++ b/web/next.config.mjs@@ -62,13 +62,13 @@ const reportToHeader = {/** @type {import("next").NextConfig} */const nextConfig = {- // Emit and SERVE browser source maps in production. Langfuse is open source,- // so there is nothing to hide by shipping maps — and doing so makes every- // client stack legible: browser devtools de-minify automatically, and Sentry- // symbolicates by fetching the public map from each bundle's sourceMappingURL- // (no upload step, no auth token, no Sentry-specific magic). This is why the- // Sentry plugin's own source-map upload stays disabled (see `sourcemaps` in- // withSentryConfig below).+ // Emit and serve browser source maps in production. Langfuse is open source,+ // so there is nothing to hide by shipping maps, and browser devtools then+ // de-minify client stacks automatically. NOTE: this alone does NOT make Sentry+ // legible — the Sentry SDK rewrites frames to the `app:///` scheme, which is+ // not a fetchable URL, so Sentry cannot pull these public maps. Sentry+ // symbolication is handled separately by uploading maps with debug IDs (see+ // `sourcemaps` in withSentryConfig below).productionBrowserSourceMaps: true,// Allow building to alternate directory for parallel build checks while dev server runsdistDir: process.env.NEXT_DIST_DIR || ".next",@@ -286,12 +286,23 @@ const sentryConfig = withSentryConfig(nextConfig, {// side errors will fail.// tunnelRoute: "/api/monitoring-tunnel",- // Keep the Sentry plugin's own source-map generation/upload OFF. We serve- // browser source maps publicly instead (`productionBrowserSourceMaps: true`- // above); Sentry fetches them from the public sourceMappingURL, so uploading- // a second copy (with an auth token + build-time upload) is redundant here.+ // Upload source maps to Sentry with debug IDs so Sentry can symbolicate+ // minified production stack traces. This restores upload that regressed in the+ // Sentry v8->v10 upgrade (#8934): it mistranslated the old `hideSourceMaps:+ // true` (upload, then hide from the public bundle) into `sourcemaps.disable`+ // (do not upload at all) — the correct v10 equivalent was+ // `deleteSourcemapsAfterUpload: true` — so Sentry stacks have been minified+ // since. Upload worked across all regions/orgs/projects under v8 via the same+ // per-region SENTRY_ORG/SENTRY_PROJECT/SENTRY_AUTH_TOKEN this reads. Debug IDs+ // match a map to an event by an embedded id, independent of URLs and the+ // `app:///` frame rewrite — which is why serving maps at a public+ // sourceMappingURL (#15277) can't symbolicate Sentry. Upload runs only when+ // SENTRY_AUTH_TOKEN is present (prod builds) and targets the per-region+ // org/project/release baked into each region's build. We also keep serving the+ // maps publicly (`productionBrowserSourceMaps` above, for devtools), so unlike+ // the old `hideSourceMaps` we do NOT delete them after upload.sourcemaps: {- disable: true,+ deleteSourcemapsAfterUpload: false,},// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)