Skip to content

Commit 970ca55

Browse files
committed
[EnvSetup] chore: sentry 설정
1 parent 75d8a88 commit 970ca55

File tree

6 files changed

+217
-36
lines changed

6 files changed

+217
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
.env.*
1415

1516
# Editor directories and files
1617
.vscode/*

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc && vite build",
7+
"dev": "vite --mode dev",
8+
"build": "tsc && vite build --mode production",
99
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1010
"preview": "vite preview",
1111
"lint-ts": "tsc --noEmit"
@@ -23,6 +23,7 @@
2323
"ua-parser-js": "^1.0.37"
2424
},
2525
"devDependencies": {
26+
"@sentry/react": "^7.113.0",
2627
"@types/node": "^20.12.7",
2728
"@types/react": "^18.2.66",
2829
"@types/react-dom": "^18.2.22",

public/templates.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[
2+
{
3+
"id": "id-1",
4+
"title": "타이틀",
5+
"description": "템플릿 설명이 한 줄 정도 들어갈 것 같음 이런 영상이 필요해요! 이런 영상을 찍어요! 2줄정도가 적당",
6+
"thumbnailSrc": "images/thumbnail-image1.png",
7+
"previewVideoSrc": "videos/record-video1.mp4",
8+
"recordVideoWebmSrc": "videos/record-video1.webm",
9+
"recordVideoMovSrc": "videos/record-video1.mov",
10+
"state": "ready"
11+
},
12+
{
13+
"id": "id-2",
14+
"title": "타이틀",
15+
"thumbnailSrc": "images/thumbnail-image1.png",
16+
"state": "preparing"
17+
},
18+
{
19+
"id": "id-3",
20+
"title": "타이틀",
21+
"thumbnailSrc": "images/thumbnail-image1.png",
22+
"state": "preparing"
23+
},
24+
{
25+
"id": "id-4",
26+
"title": "타이틀",
27+
"thumbnailSrc": "images/thumbnail-image1.png",
28+
"state": "preparing"
29+
},
30+
{
31+
"id": "id-5",
32+
"title": "타이틀",
33+
"thumbnailSrc": "images/thumbnail-image1.png",
34+
"state": "preparing"
35+
},
36+
{
37+
"id": "id-6",
38+
"title": "타이틀",
39+
"thumbnailSrc": "images/thumbnail-image1.png",
40+
"state": "preparing"
41+
},
42+
{
43+
"id": "id-7",
44+
"title": "타이틀",
45+
"thumbnailSrc": "images/thumbnail-image1.png",
46+
"state": "preparing"
47+
},
48+
{
49+
"id": "id-8",
50+
"title": "타이틀",
51+
"thumbnailSrc": "images/thumbnail-image1.png",
52+
"state": "preparing"
53+
}
54+
]

src/App.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
import CheatLayout from "@Components/layout/CheatLayout";
22
import Router from "./Router";
33
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
4+
import SentryBoundary from "@Components/boundary/SentryBoundary";
45

56
const queryClient = new QueryClient({
67
defaultOptions: { queries: { staleTime: 0 } },
78
});
89

910
function App() {
1011
return (
11-
<QueryClientProvider client={queryClient}>
12-
<CheatLayout>
13-
<Router />
14-
</CheatLayout>
15-
</QueryClientProvider>
12+
<SentryBoundary>
13+
<QueryClientProvider client={queryClient}>
14+
<CheatLayout>
15+
<Router />
16+
</CheatLayout>
17+
</QueryClientProvider>
18+
</SentryBoundary>
1619
);
1720
}
1821

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { ReactNode } from "react";
2+
import * as Sentry from "@sentry/react";
3+
4+
Sentry.init({
5+
dsn: import.meta.env.VITE_SENTRY_DSN,
6+
environment: import.meta.env.VITE_ENV,
7+
release: import.meta.env.VITE_RELEASE,
8+
integrations: [
9+
Sentry.browserTracingIntegration(),
10+
Sentry.replayIntegration(),
11+
],
12+
// Performance Monitoring
13+
tracesSampleRate: 1.0, // Capture 100% of the transactions
14+
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
15+
tracePropagationTargets: ["localhost", /^https:\/\/catsch-590d9\.web\.app/],
16+
// Session Replay
17+
18+
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.
19+
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
20+
});
21+
22+
interface SentryBoundaryProps {
23+
children: ReactNode;
24+
}
25+
26+
export default function SentryBoundary({ children }: SentryBoundaryProps) {
27+
return children;
28+
}

yarn.lock

Lines changed: 123 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,99 @@
994994
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz#c09ad9a132ccb5a67c4f211d909323ab1294f95f"
995995
integrity sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==
996996

997+
"@sentry-internal/[email protected]":
998+
version "7.113.0"
999+
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.113.0.tgz#90a3c5493e289d589cfde79330fca549a24f41a4"
1000+
integrity sha512-eEmL8QXauUnM3FXGv0GT29RpL0Jo0pkn/uMu3aqjhQo7JKNqUGVYIUxJxiGWbVMbDXqPQ7L66bjjMS3FR1GM2g==
1001+
dependencies:
1002+
"@sentry/core" "7.113.0"
1003+
"@sentry/types" "7.113.0"
1004+
"@sentry/utils" "7.113.0"
1005+
1006+
"@sentry-internal/[email protected]":
1007+
version "7.113.0"
1008+
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.113.0.tgz#8a0165494b0a0ba7b1ae45166ca90a8749c38b7a"
1009+
integrity sha512-K8uA42aobNF/BAXf14el15iSAi9fonLBUrjZi6nPDq7zaA8rPvfcTL797hwCbqkETz2zDf52Jz7I3WFCshDoUw==
1010+
dependencies:
1011+
"@sentry/core" "7.113.0"
1012+
"@sentry/replay" "7.113.0"
1013+
"@sentry/types" "7.113.0"
1014+
"@sentry/utils" "7.113.0"
1015+
1016+
"@sentry-internal/[email protected]":
1017+
version "7.113.0"
1018+
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.113.0.tgz#936f23205ab53be62f1753b923eddc243cefde86"
1019+
integrity sha512-8MDnYENRMnEfQjvN4gkFYFaaBSiMFSU/6SQZfY9pLI3V105z6JQ4D0PGMAUVowXilwNZVpKNYohE7XByuhEC7Q==
1020+
dependencies:
1021+
"@sentry/core" "7.113.0"
1022+
"@sentry/types" "7.113.0"
1023+
"@sentry/utils" "7.113.0"
1024+
1025+
1026+
version "7.113.0"
1027+
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.113.0.tgz#09b77812cbf476eacdccdc714ba4e4ba2c170a88"
1028+
integrity sha512-PdyVHPOprwoxGfKGsP2dXDWO0MBDW1eyP7EZlfZvM1A4hjk6ZRNfCv30g+TrqX4hiZDKzyqN3+AdP7N/J2IX0Q==
1029+
dependencies:
1030+
"@sentry-internal/feedback" "7.113.0"
1031+
"@sentry-internal/replay-canvas" "7.113.0"
1032+
"@sentry-internal/tracing" "7.113.0"
1033+
"@sentry/core" "7.113.0"
1034+
"@sentry/integrations" "7.113.0"
1035+
"@sentry/replay" "7.113.0"
1036+
"@sentry/types" "7.113.0"
1037+
"@sentry/utils" "7.113.0"
1038+
1039+
1040+
version "7.113.0"
1041+
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.113.0.tgz#84307eabf03ece9304894ad24ee15581a220c5c7"
1042+
integrity sha512-pg75y3C5PG2+ur27A0Re37YTCEnX0liiEU7EOxWDGutH17x3ySwlYqLQmZsFZTSnvzv7t3MGsNZ8nT5O0746YA==
1043+
dependencies:
1044+
"@sentry/types" "7.113.0"
1045+
"@sentry/utils" "7.113.0"
1046+
1047+
1048+
version "7.113.0"
1049+
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.113.0.tgz#cce71e07cf90c4bf9b22f85c3ce22d9ba926ae5a"
1050+
integrity sha512-w0sspGBQ+6+V/9bgCkpuM3CGwTYoQEVeTW6iNebFKbtN7MrM3XsGAM9I2cW1jVxFZROqCBPFtd2cs5n0j14aAg==
1051+
dependencies:
1052+
"@sentry/core" "7.113.0"
1053+
"@sentry/types" "7.113.0"
1054+
"@sentry/utils" "7.113.0"
1055+
localforage "^1.8.1"
1056+
1057+
"@sentry/react@^7.113.0":
1058+
version "7.113.0"
1059+
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.113.0.tgz#8e21c92e9691ea881639596d7e60a996b23ba229"
1060+
integrity sha512-+zVPz+h5Wydq4ntekw3/dXq5jeHIpZoQ2iqhB96PA9Y94JIq178i/xIP204S1h6rN7cmWAqtR93vnPKdxnlUbQ==
1061+
dependencies:
1062+
"@sentry/browser" "7.113.0"
1063+
"@sentry/core" "7.113.0"
1064+
"@sentry/types" "7.113.0"
1065+
"@sentry/utils" "7.113.0"
1066+
hoist-non-react-statics "^3.3.2"
1067+
1068+
1069+
version "7.113.0"
1070+
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.113.0.tgz#db41b792e5d9966a9b1ca4eb1695ad7100f39b50"
1071+
integrity sha512-UD2IaphOWKFdeGR+ZiaNAQ+wFsnwbJK6PNwcW6cHmWKv9COlKufpFt06lviaqFZ8jmNrM4H+r+R8YVTrqCuxgg==
1072+
dependencies:
1073+
"@sentry-internal/tracing" "7.113.0"
1074+
"@sentry/core" "7.113.0"
1075+
"@sentry/types" "7.113.0"
1076+
"@sentry/utils" "7.113.0"
1077+
1078+
1079+
version "7.113.0"
1080+
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.113.0.tgz#2193c9933838302c82814771b03a8647fa684ffb"
1081+
integrity sha512-PJbTbvkcPu/LuRwwXB1He8m+GjDDLKBtu3lWg5xOZaF5IRdXQU2xwtdXXsjge4PZR00tF7MO7X8ZynTgWbYaew==
1082+
1083+
1084+
version "7.113.0"
1085+
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.113.0.tgz#1e6e790c9d84e4809b2bb529bbd33a506b6db7bd"
1086+
integrity sha512-nzKsErwmze1mmEsbW2AwL2oB+I5v6cDEJY4sdfLekA4qZbYZ8pV5iWza6IRl4XfzGTE1qpkZmEjPU9eyo0yvYw==
1087+
dependencies:
1088+
"@sentry/types" "7.113.0"
1089+
9971090
"@tanstack/[email protected]":
9981091
version "5.32.0"
9991092
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.32.0.tgz#e097ec2b394a2f64de33c98cd8baf3525c99641a"
@@ -2225,6 +2318,13 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2:
22252318
dependencies:
22262319
function-bind "^1.1.2"
22272320

2321+
hoist-non-react-statics@^3.3.2:
2322+
version "3.3.2"
2323+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
2324+
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
2325+
dependencies:
2326+
react-is "^16.7.0"
2327+
22282328
http-parser-js@>=0.5.1:
22292329
version "0.5.8"
22302330
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3"
@@ -2240,6 +2340,11 @@ ignore@^5.2.0, ignore@^5.3.1:
22402340
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
22412341
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
22422342

2343+
immediate@~3.0.5:
2344+
version "3.0.6"
2345+
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
2346+
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
2347+
22432348
import-fresh@^3.2.1:
22442349
version "3.3.0"
22452350
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
@@ -2541,6 +2646,13 @@ levn@^0.4.1:
25412646
prelude-ls "^1.2.1"
25422647
type-check "~0.4.0"
25432648

2649+
2650+
version "3.1.1"
2651+
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
2652+
integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
2653+
dependencies:
2654+
immediate "~3.0.5"
2655+
25442656
lilconfig@^2.1.0:
25452657
version "2.1.0"
25462658
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
@@ -2556,6 +2668,13 @@ lines-and-columns@^1.1.6:
25562668
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
25572669
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
25582670

2671+
localforage@^1.8.1:
2672+
version "1.10.0"
2673+
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
2674+
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
2675+
dependencies:
2676+
lie "3.1.1"
2677+
25592678
locate-path@^6.0.0:
25602679
version "6.0.0"
25612680
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
@@ -2941,7 +3060,7 @@ react-hook-form@^7.51.3:
29413060
resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.51.3.tgz#7486dd2d52280b6b28048c099a98d2545931cab3"
29423061
integrity sha512-cvJ/wbHdhYx8aviSWh28w9ImjmVsb5Y05n1+FW786vEZQJV5STNM0pW6ujS+oiBecb0ARBxJFyAnXj9+GHXACQ==
29433062

2944-
react-is@^16.13.1:
3063+
react-is@^16.13.1, react-is@^16.7.0:
29453064
version "16.13.1"
29463065
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
29473066
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
@@ -3177,16 +3296,7 @@ source-map-js@^1.2.0:
31773296
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
31783297
integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
31793298

3180-
"string-width-cjs@npm:string-width@^4.2.0":
3181-
version "4.2.3"
3182-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
3183-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
3184-
dependencies:
3185-
emoji-regex "^8.0.0"
3186-
is-fullwidth-code-point "^3.0.0"
3187-
strip-ansi "^6.0.1"
3188-
3189-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
3299+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
31903300
version "4.2.3"
31913301
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
31923302
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -3250,14 +3360,7 @@ string.prototype.trimstart@^1.0.8:
32503360
define-properties "^1.2.1"
32513361
es-object-atoms "^1.0.0"
32523362

3253-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
3254-
version "6.0.1"
3255-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
3256-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
3257-
dependencies:
3258-
ansi-regex "^5.0.1"
3259-
3260-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
3363+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
32613364
version "6.0.1"
32623365
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
32633366
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -3567,16 +3670,7 @@ which@^2.0.1:
35673670
dependencies:
35683671
isexe "^2.0.0"
35693672

3570-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
3571-
version "7.0.0"
3572-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
3573-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
3574-
dependencies:
3575-
ansi-styles "^4.0.0"
3576-
string-width "^4.1.0"
3577-
strip-ansi "^6.0.0"
3578-
3579-
wrap-ansi@^7.0.0:
3673+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
35803674
version "7.0.0"
35813675
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
35823676
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

0 commit comments

Comments
 (0)