Skip to content

Commit

Permalink
Adds sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
a-poor committed Jan 4, 2025
1 parent 08b632a commit 1dbe507
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 1 deletion.
28 changes: 28 additions & 0 deletions app/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
import { HydratedRouter } from "react-router/dom";
import * as Sentry from '@sentry/react';

Sentry.init({
dsn: import.meta.env.VITE_SENTRY_DSN,
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0,
tracePropagationTargets: [
'localhost',
/^https:\/\/austinpoor\.com/,
],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});

startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<HydratedRouter />
</StrictMode>
);
});
108 changes: 108 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@react-router/fs-routes": "^7.0.2",
"@react-router/node": "^7.0.2",
"@react-router/serve": "^7.0.2",
"@sentry/react": "^8.47.0",
"clsx": "^2.1.1",
"framer-motion": "^11.15.0",
"fuse.js": "^7.0.0",
Expand Down
6 changes: 5 additions & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ assets = { directory = "./build/client/" }
routes = [
{ pattern = "austinpoor.com", custom_domain = true },
{ pattern = "www.austinpoor.com", custom_domain = true },
]
]

[vars]
VITE_SENTRY_DSN = "https://[email protected]/4508586546626560"

0 comments on commit 1dbe507

Please sign in to comment.