Browse Source

FEATURE | setup sentry admin app (#25)

Reviewed-on: #25
Co-authored-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
Co-committed-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
stage
Yevhen Romanenko 6 months ago committed by Vitalik Yatsenko
parent
commit
c6a3f44487
  1. 2
      .gitignore
  2. 31444
      package-lock.json
  3. 2
      package.json
  4. 17
      src/App.tsx
  5. 3
      src/containers/Chats/plugins/chat-item-message.component.tsx
  6. 30664
      yarn.lock

2
.gitignore vendored

@ -24,3 +24,5 @@ yarn-error.log* @@ -24,3 +24,5 @@ yarn-error.log*
.env
./.env
**/.env
# Sentry Config File
.env.sentry-build-plugin

31444
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
"@material-ui/icons": "^4.9.1",
"@mdi/font": "^3.5.95",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.3",
"@sentry/react": "^7.114.0",
"@svgr/webpack": "5.5.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
@ -186,6 +187,7 @@ @@ -186,6 +187,7 @@
"@babel/helper-call-delegate": "^7.12.13",
"@babel/helper-regex": "^7.10.5",
"@babel/preset-env": "^7.20.2",
"@sentry/webpack-plugin": "^2.16.1",
"@types/linkify-it": "^3.0.2",
"@types/lodash": "^4.14.175",
"@types/react-linkify": "^1.0.1",

17
src/App.tsx

@ -14,6 +14,23 @@ import "moment/locale/uk"; @@ -14,6 +14,23 @@ import "moment/locale/uk";
import locale from "antd/lib/locale/uk_UA";
import { appService } from "./services/system/app.service";
import * as Sentry from "@sentry/react";
Sentry.init({
dsn:
"https://9567500c736db7c1e6f5cc0735b76a5a@o402114.ingest.us.sentry.io/4507232702627840",
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
// Performance Monitoring
tracesSampleRate: 1.0,
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
// 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.
});
const App = () => {
React.useEffect(() => {
appService.initApp();

3
src/containers/Chats/plugins/chat-item-message.component.tsx

@ -87,9 +87,10 @@ const _ChatItemMessage: FC<ChatItemMessageProps> = (props) => { @@ -87,9 +87,10 @@ const _ChatItemMessage: FC<ChatItemMessageProps> = (props) => {
} as IOptionsData
}
>
{resultMessage.split(" ").map((item) =>
{resultMessage.split(" ").map((item, key) =>
item.includes("@") && findMentionId(item) ? (
<a
key={key}
onClick={() => {
const userId = findMentionId(item);
props.onMentionPress(userId);

30664
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save