Use stderr for logging
This commit is contained in:
parent
c08feba0ad
commit
e2189d4dbe
2 changed files with 17 additions and 7 deletions
|
|
@ -1,8 +1,11 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "ESNext",
|
||||||
"module": "commonjs",
|
"module": "ESNext",
|
||||||
"lib": ["ES2020"],
|
"lib": [
|
||||||
|
"DOM", // to get `fetch` & `WebSocket`
|
||||||
|
"ES2024"
|
||||||
|
],
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
@ -15,6 +18,5 @@
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"exclude": ["dist"]
|
||||||
"exclude": ["node_modules", "dist"]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,19 @@
|
||||||
import * as Sentry from "@sentry/browser";
|
import * as Sentry from "@sentry/browser";
|
||||||
|
|
||||||
|
// @ts-expect-error, injected by webpack
|
||||||
|
const packageVersion = __CURRENT_VERSION__; // eslint-disable-line
|
||||||
|
|
||||||
export const setUpTelemetry = (): (() => void) => {
|
export const setUpTelemetry = (): (() => void) => {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: "https://56accd39d92442e788a457a04623cf57@bugs.schmelczer.dev/1",
|
dsn: "https://a9bb2b9151bb450ca86b936436e356c4@bugs.schmelczer.dev/1",
|
||||||
skipBrowserExtensionCheck: false
|
release: `sync-client@${packageVersion}`,
|
||||||
|
sendDefaultPii: true,
|
||||||
|
integrations: [],
|
||||||
|
tracesSampleRate: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Sentry.captureMessage("Initialised telemetry");
|
||||||
|
|
||||||
const onError = (event: ErrorEvent): void => {
|
const onError = (event: ErrorEvent): void => {
|
||||||
Sentry.captureException(event.error, {
|
Sentry.captureException(event.error, {
|
||||||
extra: {
|
extra: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue