Skip to content

Commit 49dbe83

Browse files
committed
chore: Add and configure gatsby-plugin-newrelic
1 parent 7a5866d commit 49dbe83

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

gatsby-config.js

+27
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,32 @@ module.exports = {
7171
},
7272
'gatsby-plugin-sitemap',
7373
'gatsby-plugin-meta-redirect',
74+
{
75+
resolve: 'gatsby-plugin-newrelic',
76+
options: {
77+
configs: {
78+
production: {
79+
instrumentationType: 'proAndSPA',
80+
accountId: '10175106',
81+
trustKey: '1',
82+
agentID: '22273498',
83+
licenseKey: '23448da482',
84+
applicationID: '22273498',
85+
beacon: 'staging-bam.nr-data.net',
86+
errorBeacon: 'staging-bam.nr-data.net',
87+
},
88+
development: {
89+
instrumentationType: 'proAndSPA',
90+
accountId: '10175106',
91+
trustKey: '1',
92+
agentID: '22273531',
93+
licenseKey: '23448da482',
94+
applicationID: '22273531',
95+
beacon: 'staging-bam.nr-data.net',
96+
errorBeacon: 'staging-bam.nr-data.net',
97+
},
98+
},
99+
},
100+
},
74101
],
75102
};

package-lock.json

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"gatsby-plugin-manifest": "^2.3.5",
1515
"gatsby-plugin-mdx": "^1.2.11",
1616
"gatsby-plugin-meta-redirect": "^1.1.1",
17+
"gatsby-plugin-newrelic": "newrelic/gatsby-plugin-newrelic.git#5cd42e832f0588764dc332ce7ebd05794de5106a",
1718
"gatsby-plugin-offline": "^3.1.4",
1819
"gatsby-plugin-react-helmet": "^3.2.4",
1920
"gatsby-plugin-robots-txt": "^1.5.1",
@@ -57,6 +58,8 @@
5758
"license": "MIT",
5859
"scripts": {
5960
"build": "gatsby build",
61+
"build:production": "GATSBY_NEWRELIC_ENV=production gatsby build",
62+
"build:staging": "GATSBY_NEWRELIC_ENV=staging gatsby build",
6063
"develop": "gatsby develop",
6164
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
6265
"start": "npm run develop",

0 commit comments

Comments
 (0)