Upgrade sentry (#7145)

Upgrave Sentry to v8 and add Sentry Cron monitoring

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Félix Malfait
2024-09-19 18:09:24 +02:00
committed by GitHub
parent b3ed6cb903
commit 3025ac346c
22 changed files with 879 additions and 210 deletions

View File

@ -1,4 +1,4 @@
import { SentryInitEffect } from '@/error-handler/components/SentryInitiEffect';
import { SentryInitEffect } from '@/error-handler/components/SentryInitEffect';
export const ExceptionHandlerProvider: React.FC<React.PropsWithChildren> = ({
children,

View File

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import * as Sentry from '@sentry/react';
import { isNonEmptyString } from '@sniptt/guards';
import { useEffect, useState } from 'react';
import { useRecoilValue } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
@ -26,14 +26,10 @@ export const SentryInitEffect = () => {
release: sentryConfig?.release ?? undefined,
dsn: sentryConfig?.dsn,
integrations: [
new Sentry.BrowserTracing({
tracePropagationTargets: [
'localhost:3001',
REACT_APP_SERVER_BASE_URL,
],
}),
new Sentry.Replay(),
Sentry.browserTracingIntegration({}),
Sentry.replayIntegration(),
],
tracePropagationTargets: ['localhost:3001', REACT_APP_SERVER_BASE_URL],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,