Skip to content

Commit

Permalink
Merge pull request #620 from hotosm/feat-sentry-setup
Browse files Browse the repository at this point in the history
Feat sentry setup
  • Loading branch information
varun2948 authored Jul 20, 2023
2 parents 5364c0f + e1ff965 commit 2d9fb5a
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 70 deletions.
164 changes: 97 additions & 67 deletions src/frontend/main/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/frontend/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@mui/lab": "^5.0.0-alpha.134",
"@mui/material": "^5.11.1",
"@reduxjs/toolkit": "^1.9.1",
"@sentry/browser": "^7.59.2",
"@sentry/react": "^7.59.3",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"axios": "^1.2.2",
Expand Down
20 changes: 18 additions & 2 deletions src/frontend/main/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,28 @@ import routes from "./routes";
import { PersistGate } from "redux-persist/integration/react";
import "./index.css";
import 'react-loading-skeleton/dist/skeleton.css'
import * as Sentry from "@sentry/browser";
import * as Sentry from "@sentry/react";
import environment from "./environment";
// import 'swiper/css';
// import 'swiper/css/navigation';
// import 'swiper/css/pagination';
{ environment.nodeEnv !== 'development' ? Sentry.init({ dsn: environment.main_url === 'fmtm.hotosm.org' ? "https://419f6e226571489d9a767f75c7ae157f@glitchtip.naxa.com.np/6" : "https://2f6079201d4a48f8acdb1a31763e0c0d@glitchtip.naxa.com.np/4" }) : null };
{
environment.nodeEnv !== 'development' ? Sentry.init({
dsn: environment.main_url === 'fmtm.hotosm.org' ? "https://35c80d0894e441f593c5ac5dfa1094a0@o68147.ingest.sentry.io/4505557311356928" : "https://35c80d0894e441f593c5ac5dfa1094a0@o68147.ingest.sentry.io/4505557311356928",
integrations: [
new Sentry.BrowserTracing({
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["https://fmtm.naxa.com.np/", "https://fmtm.hotosm.org/"],
}),
new Sentry.Replay(),
],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
}) : null
};


ReactDOM.render(
Expand Down

0 comments on commit 2d9fb5a

Please sign in to comment.