Skip to content

Commit d36c6d4

Browse files
committed
Install official Sentry package
1 parent 319e4b6 commit d36c6d4

File tree

3 files changed

+75
-72
lines changed

3 files changed

+75
-72
lines changed

gatsby-config.js

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require('dotenv').config({
77

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

1211
const shouldAnnouncementBannerBeShown = false;
1312

@@ -83,24 +82,6 @@ const plugins = [
8382
],
8483
},
8584
},
86-
{
87-
resolve: 'gatsby-plugin-sentry',
88-
options: {
89-
dsn:
90-
'https://[email protected]/5289132',
91-
// Optional settings, see https://docs.sentry.io/clients/node/config/#optional-settings
92-
environment: isProduction ? 'production' : 'staging',
93-
enabled: isProduction || isStaging,
94-
ignoreErrors: [
95-
// that's a real bug we have, but I'm ignoring it for now.
96-
'getBoundingClientRect',
97-
"Cannot read property 'getBoundingClientRect' of undefined",
98-
"TypeError: undefined is not an object (evaluating 'n.content.getBoundingClientRect')",
99-
'n.content is undefined', // same as above.
100-
],
101-
denyUrls: [],
102-
},
103-
},
10485
{
10586
resolve: 'gatsby-plugin-google-fonts',
10687
options: {
@@ -261,6 +242,15 @@ if (isProduction) {
261242
allowLinker: true,
262243
},
263244
});
245+
246+
plugins.push({
247+
resolve: '@sentry/gatsby',
248+
options: {
249+
dsn:
250+
'https://[email protected]/5289132',
251+
environment: 'production',
252+
},
253+
});
264254
}
265255

266256
if (process.env.BUCKET_NAME) {

package-lock.json

Lines changed: 65 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"dependencies": {
2424
"@mdx-js/mdx": "^1.6.18",
2525
"@mdx-js/react": "^1.6.18",
26+
"@sentry/gatsby": "^5.27.3",
2627
"algoliasearch": "^4.5.1",
2728
"chunk-text": "^2.0.1",
2829
"classnames": "^2.2.6",
@@ -44,7 +45,6 @@
4445
"gatsby-plugin-resolve-src": "^2.0.0",
4546
"gatsby-plugin-s3": "^0.3.5",
4647
"gatsby-plugin-sass": "^2.3.16",
47-
"gatsby-plugin-sentry": "^1.0.1",
4848
"gatsby-plugin-sharp": "^2.6.40",
4949
"gatsby-plugin-sitemap": "^2.4.15",
5050
"gatsby-plugin-svgr-svgo": "^1.0.12",

0 commit comments

Comments
 (0)