mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-26 20:29:33 +00:00
Migrate sentry to webpack
This commit is contained in:
1 parent
1720307c21
commit
361a06e5b3
7 files changed
+146
-19
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { exportToHtml } from "#core:utils/globals";
|
||||
// biome-ignore lint/style/noNamespaceImport: this is the recommended way from the documentation
|
||||
import * as Sentry from "@sentry/browser";
|
||||
|
||||
interface LoggedUser {
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
interface SentryOptions {
|
||||
dsn: string;
|
||||
eventId: string;
|
||||
user?: LoggedUser;
|
||||
}
|
||||
|
||||
exportToHtml("loadSentryPopup", (options: SentryOptions) => {
|
||||
Sentry.init({
|
||||
dsn: options.dsn,
|
||||
});
|
||||
Sentry.showReportDialog({
|
||||
eventId: options.eventId,
|
||||
...(options.user ?? {}),
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user