Skip to content

Commit 91c4d15

Browse files
committed
Implemented sentry
1 parent d7c2af0 commit 91c4d15

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SENTRY_DSN=
1+
VITE_SENTRY_DSN=

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ If you would like to force existing analysis to be recomputed, you may force upd
135135

136136
1. `rspec` (tests are located in */spec* directory)
137137

138+
## Configuring React Environment
139+
140+
### Local setup
141+
142+
In the project's root directory, create a `.env.local` file following the format of the `.env.example` file
143+
144+
### Server setup
145+
146+
In the project's root directory, create a `.env.production` file following the format of the `.env.example` file
147+
138148
## Deploying Updates to Server
139149

140150
1. Ensure server has your public SSH key

app/frontend/components/wikipedia-category-page.component.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,7 @@ export default function WikipediaCategoryPage() {
6464
subcategories. Whenever a category is expanded for the first time, the
6565
tool will retrieve the data for the subcategories 2 levels down.
6666
</p>
67-
<h3>Legend</h3>{" "}
68-
<button
69-
type="button"
70-
onClick={() => {
71-
throw new Error("Sentry Test Error");
72-
}}
73-
>
74-
Break the world
75-
</button>
76-
;
67+
<h3>Legend</h3>
7768
<div>
7869
<BsExclamationCircleFill color="#71afef" /> Indicates that the given
7970
category has missing subcategories

app/frontend/services/sentry.service.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from "react-router-dom";
99

1010
Sentry.init({
11-
dsn: import.meta.env.SENTRY_DSN,
11+
dsn: import.meta.env.VITE_SENTRY_DSN,
1212
integrations: [
1313
// See docs for support of different versions of variation of react router
1414
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/
@@ -26,9 +26,6 @@ Sentry.init({
2626
// of transactions for tracing.
2727
tracesSampleRate: 1.0,
2828

29-
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
30-
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
31-
3229
// Capture Replay for 10% of all sessions,
3330
// plus for 100% of sessions with an error
3431
replaysSessionSampleRate: 0.1,

0 commit comments

Comments
 (0)