report errors to sentry

This commit is contained in:
m5r
2022-06-26 17:01:55 +02:00
parent 590e92eea4
commit 961dc8e461
11 changed files with 446 additions and 126 deletions

View File

@ -1,5 +1,21 @@
import { hydrate } from "react-dom";
import { RemixBrowser } from "@remix-run/react";
import * as Sentry from "@sentry/browser";
import { Integrations } from "@sentry/tracing";
declare global {
interface Window {
shellphoneConfig: {
sentry: { dsn: string };
};
}
}
Sentry.init({
dsn: window.shellphoneConfig.sentry.dsn,
tracesSampleRate: 1.0,
integrations: [new Integrations.BrowserTracing()],
});
hydrate(<RemixBrowser />, document);