movie-web/src/setup/sentry.tsx

18 lines
467 B
TypeScript
Raw Normal View History

import { CaptureConsole, HttpClient } from "@sentry/integrations";
import * as Sentry from "@sentry/react";
import { conf } from "@/setup/config";
import { SENTRY_DSN } from "@/setup/constants";
2023-06-08 03:08:17 +02:00
if (process.env.NODE_ENV !== "development")
Sentry.init({
dsn: SENTRY_DSN,
release: `movie-web@${conf().APP_VERSION}`,
sampleRate: 0.5,
integrations: [
new Sentry.BrowserTracing(),
new CaptureConsole(),
new HttpClient(),
],
});