Skip to content

Commit

Permalink
invert sentry call, resolve deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
enguerranws committed Dec 12, 2024
1 parent 1251d9b commit ac86fe1
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions front/src/app/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { startReactDsfr } from "@codegouvfr/react-dsfr/spa";
import * as Sentry from "@sentry/browser";
import {
browserTracingIntegration,
init as SentryInit,
replayIntegration,
} from "@sentry/browser";
import React from "react";
import { createRoot } from "react-dom/client";
import { ErrorBoundary } from "react-error-boundary";
Expand All @@ -12,16 +16,6 @@ import { ENV } from "src/config/environmentVariables";
import { DefaultMetaContent } from "./components/layout/DefaultMetaContent";
import { RouteProvider } from "./routes/routes";

Sentry.init({
dsn: "https://c2909f1d7f384d17bde3e75e250f2828@sentry.gip-inclusion.cloud-ed.fr/2",
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
release: import.meta.env.VITE_RELEASE_TAG,
environment: ENV.envType,
tracesSampleRate: 0.01,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0,
});

startReactDsfr({ defaultColorScheme: "light" });

const rootContainer = document.getElementById("root");
Expand All @@ -42,3 +36,13 @@ createRoot(rootContainer).render(
</Provider>
</React.StrictMode>,
);

SentryInit({
dsn: "https://c2909f1d7f384d17bde3e75e250f2828@sentry.gip-inclusion.cloud-ed.fr/2",
integrations: [browserTracingIntegration(), replayIntegration()],
release: import.meta.env.VITE_RELEASE_TAG,
environment: ENV.envType,
tracesSampleRate: 0.01,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0,
});

0 comments on commit ac86fe1

Please sign in to comment.