diff --git a/assets/js/dashboard/sentry.js b/assets/js/dashboard/sentry.js new file mode 100644 index 000000000..5b809d478 --- /dev/null +++ b/assets/js/dashboard/sentry.js @@ -0,0 +1,18 @@ +import * as Sentry from "@sentry/react"; +import { Integrations } from "@sentry/tracing"; + +const container = document.getElementById('stats-react-container') + +Sentry.init({ + dsn: container.dataset.sentryDsn, + environment: container.dataset.environment, + integrations: [new Integrations.BrowserTracing()], + release: container.dataset.sentryRelease || "unknown", + initialScope: { + tags: { + 'app_version': container.dataset.sentryRelease, + 'origin': 'dashboard' + }, + }, + tracesSampleRate: 0.5, +});