mirror of
https://github.com/MrUnknownDE/utools.git
synced 2026-04-24 16:33:45 +02:00
ProfilingIntegration fix
This commit is contained in:
@@ -3,7 +3,8 @@ require('dotenv').config(); // Lädt Variablen aus .env in process.env
|
|||||||
|
|
||||||
// --- Sentry Initialisierung (GANZ OBEN!) ---
|
// --- Sentry Initialisierung (GANZ OBEN!) ---
|
||||||
const Sentry = require("@sentry/node");
|
const Sentry = require("@sentry/node");
|
||||||
const { ProfilingIntegration } = require("@sentry/profiling-node");
|
// Korrigierter Import für ProfilingIntegration
|
||||||
|
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
// Ersetzen Sie dies durch Ihren echten Sentry DSN oder verwenden Sie die .env Datei
|
// Ersetzen Sie dies durch Ihren echten Sentry DSN oder verwenden Sie die .env Datei
|
||||||
@@ -11,7 +12,8 @@ Sentry.init({
|
|||||||
integrations: [
|
integrations: [
|
||||||
// Standardintegrationen wie Http und Express werden automatisch hinzugefügt.
|
// Standardintegrationen wie Http und Express werden automatisch hinzugefügt.
|
||||||
// Fügen Sie hier nur zusätzliche oder benutzerdefinierte Integrationen hinzu.
|
// Fügen Sie hier nur zusätzliche oder benutzerdefinierte Integrationen hinzu.
|
||||||
new ProfilingIntegration(),
|
// Korrigierte Verwendung: Aufruf als Funktion, nicht mit 'new'
|
||||||
|
nodeProfilingIntegration(),
|
||||||
],
|
],
|
||||||
// Performance Monitoring
|
// Performance Monitoring
|
||||||
tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.1 : 1.0, // 10% in Produktion, 100% sonst
|
tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.1 : 1.0, // 10% in Produktion, 100% sonst
|
||||||
|
|||||||
Reference in New Issue
Block a user