Skip to content

Commit

Permalink
Install official Sentry package
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano committed Nov 9, 2020
1 parent 319e4b6 commit d36c6d4
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 72 deletions.
28 changes: 9 additions & 19 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require('dotenv').config({

const mainURL = process.env.GATSBY_DEFAULT_DOC_URL;
const isProduction = mainURL === 'https://k6.io/docs';
const isStaging = mainURL.startsWith('https://staging.k6.io');

const shouldAnnouncementBannerBeShown = false;

Expand Down Expand Up @@ -83,24 +82,6 @@ const plugins = [
],
},
},
{
resolve: 'gatsby-plugin-sentry',
options: {
dsn:
'https://[email protected]/5289132',
// Optional settings, see https://docs.sentry.io/clients/node/config/#optional-settings
environment: isProduction ? 'production' : 'staging',
enabled: isProduction || isStaging,
ignoreErrors: [
// that's a real bug we have, but I'm ignoring it for now.
'getBoundingClientRect',
"Cannot read property 'getBoundingClientRect' of undefined",
"TypeError: undefined is not an object (evaluating 'n.content.getBoundingClientRect')",
'n.content is undefined', // same as above.
],
denyUrls: [],
},
},
{
resolve: 'gatsby-plugin-google-fonts',
options: {
Expand Down Expand Up @@ -261,6 +242,15 @@ if (isProduction) {
allowLinker: true,
},
});

plugins.push({
resolve: '@sentry/gatsby',
options: {
dsn:
'https://[email protected]/5289132',
environment: 'production',
},
});
}

if (process.env.BUCKET_NAME) {
Expand Down
117 changes: 65 additions & 52 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dependencies": {
"@mdx-js/mdx": "^1.6.18",
"@mdx-js/react": "^1.6.18",
"@sentry/gatsby": "^5.27.3",
"algoliasearch": "^4.5.1",
"chunk-text": "^2.0.1",
"classnames": "^2.2.6",
Expand All @@ -44,7 +45,6 @@
"gatsby-plugin-resolve-src": "^2.0.0",
"gatsby-plugin-s3": "^0.3.5",
"gatsby-plugin-sass": "^2.3.16",
"gatsby-plugin-sentry": "^1.0.1",
"gatsby-plugin-sharp": "^2.6.40",
"gatsby-plugin-sitemap": "^2.4.15",
"gatsby-plugin-svgr-svgo": "^1.0.12",
Expand Down

0 comments on commit d36c6d4

Please sign in to comment.