Enable node profiling in Sentry

This commit is contained in:
Jade Ellis
2024-09-10 01:33:41 +01:00
parent e234f983a1
commit 7e66d5b194
3 changed files with 443 additions and 3 deletions
+1
View File
@@ -75,6 +75,7 @@
"@lezer/highlight": "^1.2.1",
"@octokit/types": "^13.5.0",
"@resvg/resvg-js": "^2.6.2",
"@sentry/profiling-node": "^8.29.0",
"@sentry/sveltekit": "^8.26.0",
"@steeze-ui/svelte-icon": "^1.5.0",
"@tabler/icons-svelte": "^3.12.0",
+9 -3
View File
@@ -1,13 +1,19 @@
import { sequence } from '@sveltejs/kit/hooks';
import {init as initSentry, handleErrorWithSentry, sentryHandle} from '@sentry/sveltekit';
import { init as initSentry, handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
import type { Handle } from "@sveltejs/kit";
import { randomBytes } from 'crypto';
import { SENTRY_DSN, SENTRY_REPORT_URL } from '$lib/config';
import { nodeProfilingIntegration } from "@sentry/profiling-node";
initSentry({
dsn: SENTRY_DSN,
environment: import.meta.env.MODE,
tracesSampleRate: 1
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
})
const securityHeaders = {