Apply editorconfig
This commit is contained in:
parent
496db06213
commit
4150eb2720
131 changed files with 17155 additions and 14368 deletions
|
|
@ -4,38 +4,38 @@ import * as Sentry from "@sentry/browser";
|
|||
const packageVersion = __CURRENT_VERSION__; // eslint-disable-line
|
||||
|
||||
export const setUpTelemetry = (): (() => void) => {
|
||||
Sentry.init({
|
||||
dsn: "https://a9bb2b9151bb450ca86b936436e356c4@bugs.schmelczer.dev/1",
|
||||
release: `sync-client@${packageVersion}`,
|
||||
sendDefaultPii: true,
|
||||
integrations: [],
|
||||
tracesSampleRate: 0
|
||||
});
|
||||
Sentry.init({
|
||||
dsn: "https://a9bb2b9151bb450ca86b936436e356c4@bugs.schmelczer.dev/1",
|
||||
release: `sync-client@${packageVersion}`,
|
||||
sendDefaultPii: true,
|
||||
integrations: [],
|
||||
tracesSampleRate: 0
|
||||
});
|
||||
|
||||
Sentry.captureMessage("Initialised telemetry");
|
||||
Sentry.captureMessage("Initialised telemetry");
|
||||
|
||||
const onError = (event: ErrorEvent): void => {
|
||||
Sentry.captureException(event.error, {
|
||||
extra: {
|
||||
message: event.message,
|
||||
filename: event.filename,
|
||||
lineno: event.lineno,
|
||||
colno: event.colno
|
||||
}
|
||||
});
|
||||
};
|
||||
window.addEventListener("error", onError);
|
||||
const onError = (event: ErrorEvent): void => {
|
||||
Sentry.captureException(event.error, {
|
||||
extra: {
|
||||
message: event.message,
|
||||
filename: event.filename,
|
||||
lineno: event.lineno,
|
||||
colno: event.colno
|
||||
}
|
||||
});
|
||||
};
|
||||
window.addEventListener("error", onError);
|
||||
|
||||
const onUnhandledRejection = (event: PromiseRejectionEvent): void => {
|
||||
Sentry.captureException(event.reason);
|
||||
};
|
||||
window.addEventListener("unhandledrejection", onUnhandledRejection);
|
||||
const onUnhandledRejection = (event: PromiseRejectionEvent): void => {
|
||||
Sentry.captureException(event.reason);
|
||||
};
|
||||
window.addEventListener("unhandledrejection", onUnhandledRejection);
|
||||
|
||||
return (): void => {
|
||||
window.removeEventListener("error", onError);
|
||||
window.removeEventListener("unhandledrejection", onUnhandledRejection);
|
||||
Sentry.close(5000).catch(() => {
|
||||
// Ignore errors during shutdown
|
||||
});
|
||||
};
|
||||
return (): void => {
|
||||
window.removeEventListener("error", onError);
|
||||
window.removeEventListener("unhandledrejection", onUnhandledRejection);
|
||||
Sentry.close(5000).catch(() => {
|
||||
// Ignore errors during shutdown
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue