Skip to content

Commit 04bc6ae

Browse files
committed
add sentry
1 parent a6cc280 commit 04bc6ae

5 files changed

Lines changed: 19 additions & 34 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@react-spring/web": "10.0.3",
2828
"@react-three/drei": "^9.122.0",
2929
"@react-three/fiber": "^8.18.0",
30-
"@sentry/react": "^8.53.0",
30+
"@sentry/react": "^8.55.2",
3131
"@testing-library/jest-dom": "^5.16.5",
3232
"@testing-library/react": "^13.4.0",
3333
"@testing-library/user-event": "^13.5.0",

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import { LoaderProvider } from "./services/reducers/LoaderProvider.jsx";
1919
import RotateDevice from "./components/RotateDevice";
2020
import { useAppHeight } from "./hooks/useAppHeight.js";
2121
import { ScrollDirectionProvider } from "./services/reducers/ScrollDirectionContext.jsx";
22+
import * as Sentry from "@sentry/react";
2223
function App() {
2324
useAppHeight();
24-
/** */
2525
useLayoutEffect(() => {
2626
window.Echo = new Echo({
2727
broadcaster: "pusher",

src/components/RotateDevice.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const RotateDevice = () => {
4949
return (
5050
<RotateContainer>
5151
<RotateIcon />
52-
<RotateText>لطفاً گوشی خود را به حالت افقی بچرخانید</RotateText>
52+
<RotateText>{getFieldTranslationByNames(1372)}</RotateText>
5353
</RotateContainer>
5454
);
5555
};

src/main.jsx

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
11
import React from "react";
22
import ReactDOM from "react-dom/client";
33
import App from "./App";
4-
// import * as Sentry from "@sentry/react";
4+
import * as Sentry from "@sentry/react";
55

6-
// const isDebugEnabled =
7-
// window.location.hostname === "localhost" ||
8-
// window.location.hostname === "frdevelop.irpsc.com";
6+
Sentry.init({
7+
dsn: "https://36c0b7c2ae9c5519c5b9205a6a8c6cc3@sentry.irpsc.com/3",
98

10-
// Sentry.init({
11-
// dsn: "https://c71a2b88c754680dc5e405ccce46ffdf@sentry.hamravesh.com/7902",
12-
// integrations: [
13-
// Sentry.browserTracingIntegration(),
14-
// Sentry.replayIntegration(),
15-
// ],
16-
// // Performance and debugging
17-
// enabled: "production",
18-
// debug: isDebugEnabled,
19-
// release: "1.0.0",
20-
// dist: "1",
21-
// attachStacktrace: true,
22-
// autoSessionTracking: true,
23-
// // Tracing
24-
// tracesSampleRate: 1.0, // Capture 100% of the transactions
25-
// // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
26-
// tracePropagationTargets: [
27-
// "localhost",
28-
// "https://frdevelop.irpsc.com/metaverse/",
29-
// ],
30-
// // Session Replay
31-
// 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.
32-
// replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
33-
// });
9+
integrations: [
10+
Sentry.replayIntegration({
11+
maskAllText: true,
12+
maskAllInputs: true,
13+
blockAllMedia: true,
14+
}),
15+
],
3416

35-
const root = ReactDOM.createRoot(document.getElementById("root"));
36-
root.render(<App />);
17+
replaysSessionSampleRate: 0.1,
18+
replaysOnErrorSampleRate: 1.0,
19+
});
20+
21+
ReactDOM.createRoot(document.getElementById("root")).render(<App />);

0 commit comments

Comments
 (0)