mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(sentry): add wip sentry integration on server side
This commit is contained in:
1 parent
4b724dfa73
commit
02f0abd761
10 files changed
+330
-64
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { Server } from 'esx.js';
|
||||
import { ResourceConfig } from '../../typings/config';
|
||||
import { RewriteFrames } from '@sentry/integrations';
|
||||
|
||||
// Setup and export config loaded at runtime
|
||||
export const config: ResourceConfig = JSON.parse(
|
||||
@@ -21,6 +22,21 @@ import './bank/bank.controller';
|
||||
|
||||
import './sv_main';
|
||||
import { mainLogger } from './sv_logger';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import * as Tracing from '@sentry/tracing';
|
||||
|
||||
// Setup sentry tracing
|
||||
if (config.debug.sentryEnabled && process.env.NODE_ENV === 'production') {
|
||||
Sentry.init({
|
||||
dsn: 'https://[email protected]/3',
|
||||
integrations: [new RewriteFrames()],
|
||||
release: process.env.SENTRY_RELEASE || '0.0.0',
|
||||
// Set tracesSampleRate to 1.0 to capture 100%
|
||||
// of transactions for performance monitoring.
|
||||
// We recommend adjusting this value in production
|
||||
tracesSampleRate: 1.0,
|
||||
});
|
||||
}
|
||||
|
||||
export let ESX: Server = null;
|
||||
|
||||
|
||||
Reference in new issue
Block a user