mirror of
https://github.com/VladSez/easy-invoice-pdf
synced 2026-04-21 13:37:40 +00:00
- Updated package manager version from pnpm@10.6.5 to pnpm@10.9.0 in package.json. - Increased Playwright expect assertion timeout from 15 seconds to 25 seconds for improved test reliability. - Refactored Sentry configuration in client, edge, and server files to utilize environment checks for enabling Sentry and DSN management, ensuring better performance and clarity in production environments.
26 lines
844 B
TypeScript
26 lines
844 B
TypeScript
// This file configures the initialization of Sentry on the server.
|
|
// The config you add here will be used whenever the server handles a request.
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
|
|
import * as Sentry from "@sentry/nextjs";
|
|
|
|
const isCI = process.env.CI === "true";
|
|
|
|
const isSentryEnabled = process.env.SENTRY_ENABLED === "true" && !isCI;
|
|
|
|
if (isSentryEnabled) {
|
|
Sentry.init({
|
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
enabled: isSentryEnabled,
|
|
|
|
// Adjust sampling in production for better performance/cost balance
|
|
tracesSampleRate: 0.15, // Sample 15% of transactions
|
|
|
|
// Recommended production settings
|
|
debug: false,
|
|
|
|
// Performance settings
|
|
replaysSessionSampleRate: 0.1, // Sample 10% of sessions
|
|
replaysOnErrorSampleRate: 1.0, // But capture all sessions with errors
|
|
});
|
|
}
|