Disable error tracking in prod (#182)

closes #161
This commit is contained in:
sua yoo 2022-03-04 16:17:05 -08:00 committed by GitHub
parent fb51f8e33e
commit 4383c5e8d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,14 +18,15 @@
<browsertrix-app></browsertrix-app>
<script>
const dsn = "<%= glitchtip_dsn %>"
const isDev = "<%= environment %>" === "development";
const dsn = "<%= glitchtip_dsn %>";
if (dsn) {
if (isDev && dsn) {
Sentry.init({
dsn: dsn,
release: "<%= commit_hash %>",
environment: "<%= environment %>",
debug: "<%= environment %>" === "development",
debug: isDev,
autoSessionTracking: false, // Turn off unsupported page/session tracking
});
}