Revert "fix: add withSentryConfig to enable Sentry tracing in production (#26…" (#26744)

This reverts commit dd4e8344c9.
This commit is contained in:
Volnei Munhoz
2026-01-12 12:16:08 +00:00
committed by GitHub
parent dd4e8344c9
commit c36f4d4a65
+2 -22
View File
@@ -1,17 +1,16 @@
import process from "node:process";
import { withSentryConfig } from "@sentry/nextjs";
import { withBotId } from "botid/next/config";
import { config as dotenvConfig } from "dotenv";
import type { NextConfig } from "next";
import type { RouteHas } from "next/dist/lib/load-custom-routes";
import { withAxiom } from "next-axiom";
import i18nConfig from "./next-i18next.config";
import packageJson from "./package.json";
import {
nextJsOrgRewriteConfig,
orgUserRoutePath,
orgUserTypeEmbedRoutePath,
orgUserTypeRoutePath,
orgUserTypeEmbedRoutePath,
} from "./pagesAndRewritePaths";
dotenvConfig({ path: "../../.env" });
@@ -140,25 +139,6 @@ if (process.env.NEXT_PUBLIC_VERCEL_USE_BOTID_IN_BOOKER === "1") {
plugins.push(withBotId);
}
const sentryTracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE ?? "0.0") || 0.0;
const isSentryEnabled =
process.env.NODE_ENV === "production" &&
process.env.NEXT_PUBLIC_SENTRY_DSN &&
sentryTracesSampleRate > 0;
if (isSentryEnabled) {
plugins.push((config) =>
withSentryConfig(config, {
silent: !process.env.SENTRY_DEBUG,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
widenClientFileUpload: true,
disableLogger: true,
})
);
}
interface OrgDomainMatcher {
has: RouteHas[];
source: string;