Skip to content

Commit

Permalink
log console.error to sentry (excalidraw#1243)
Browse files Browse the repository at this point in the history
* log console.error to sentry

* fix
  • Loading branch information
dwelle authored Apr 7, 2020
1 parent 13a2253 commit 88cec2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"dependencies": {
"@sentry/browser": "5.15.4",
"@sentry/integrations": "5.15.4",
"browser-nativefs": "0.4.0",
"i18next-browser-languagedetector": "4.0.2",
"nanoid": "2.1.11",
Expand Down
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import ReactDOM from "react-dom";
import * as Sentry from "@sentry/browser";
import * as SentryIntegrations from "@sentry/integrations";
import { TopErrorBoundary } from "./components/TopErrorBoundary";
import { IsMobileProvider } from "./is-mobile";
import { App } from "./components/App";
Expand All @@ -22,6 +23,11 @@ Sentry.init({
: undefined,
environment: onlineEnv ? SentyEnvHostnameMap[onlineEnv] : undefined,
release: process.env.REACT_APP_GIT_SHA,
integrations: [
new SentryIntegrations.CaptureConsole({
levels: ["error"],
}),
],
});

// Block pinch-zooming on iOS outside of the content area
Expand Down

0 comments on commit 88cec2d

Please sign in to comment.