Skip to content

Commit

Permalink
Merge pull request #945 from singnet/add-sentry
Browse files Browse the repository at this point in the history
[SPT-748] Add sentry logger
  • Loading branch information
TerNik authored Nov 20, 2024
2 parents 998333b + 4351a62 commit 09d4976
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^3.0.0-alpha.30",
"@material-ui/styles": "^4.11.2",
"@sentry/browser": "^5.29.0",
"@sentry/react": "^8.30.0",
"aws-amplify": "^4.3.46",
"clsx": "^1.1.1",
"color": "^3.1.3",
Expand Down
11 changes: 9 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { Provider as ReduxProvider } from "react-redux";
import * as Sentry from "@sentry/browser";
import * as Sentry from '@sentry/react';

import "./index.css";
import "./assets/icomoon.css";
import configureStore from "./Redux/Store";
import SnetApp from "./SnetApp";

if (process.env.NODE_ENV === "production") {
Sentry.init({ dsn: process.env.REACT_APP_SENTRY_DSN });
Sentry.init({
dsn: process.env.REACT_APP_SENTRY_DSN,
integrations: [
Sentry.replayIntegration(),
],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});
}

export const store = configureStore();
Expand Down

0 comments on commit 09d4976

Please sign in to comment.