Skip to content

Commit

Permalink
wip: adding sentry, blocked by CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker committed Apr 4, 2024
1 parent a7bda16 commit 6010305
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions dashboard/.env.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_HOST="http://localhost:8090/api"
VITE_SEARCH_UI_URL="http://localhost:5174"
VITE_CHAT_UI_URL="http://localhost:5173"
VITE_SENTRY_DSN="https://[email protected]/7"
23 changes: 23 additions & 0 deletions dashboard/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@ import { UserManagement } from "./pages/Dashboard/UserManagment.tsx";
import { ContextWrapper } from "./layouts/ContextWrapper.tsx";
import { DatasetEvents } from "./pages/Dashboard/Dataset/DatasetEvents.tsx";

import * as Sentry from "@sentry/browser";

Sentry.init({
dsn: "https://[email protected]/7",
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],

// Capture Replay for 10% of all sessions,
// plus 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});

const root = document.getElementById("root");

render(
Expand Down
5 changes: 0 additions & 5 deletions dashboard/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,6 @@
lodash.merge "^4.6.2"
postcss-selector-parser "6.0.10"

"@thisbeyond/solid-select@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@thisbeyond/solid-select/-/solid-select-0.14.0.tgz#1f6ed9e2c54818a13943624f4a66e32d5c933062"
integrity sha512-ecq4U3Vnc/nJbU84ARuPg2scNuYt994ljF5AmBlzuZW87x43mWiGJ5hEWufIJJMpDT6CcnCIx/xbrdDkaDEHQw==

"@types/acorn@^4.0.0":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.6.tgz#d61ca5480300ac41a7d973dd5b84d0a591154a22"
Expand Down

0 comments on commit 6010305

Please sign in to comment.