Skip to content

Commit

Permalink
Merge pull request #234 from newrelic/liz/instrumentation
Browse files Browse the repository at this point in the history
Add browser agent
  • Loading branch information
LizBaker authored Jun 24, 2020
2 parents 7af8296 + c3c531d commit 32e05bd
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
21 changes: 21 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 0.1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- |
if [ "${AWS_BRANCH}" = "master" ]; then
npm run build:production;
else
npm run build:staging;
fi
artifacts:
baseDirectory: public
files:
- '**/*'
cache:
paths:
- node_modules/**/*
27 changes: 27 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,32 @@ module.exports = {
},
'gatsby-plugin-sitemap',
'gatsby-plugin-meta-redirect',
{
resolve: 'gatsby-plugin-newrelic',
options: {
configs: {
production: {
instrumentationType: 'proAndSPA',
accountId: '10175106',
trustKey: '1',
agentID: '22273498',
licenseKey: '23448da482',
applicationID: '22273498',
beacon: 'staging-bam.nr-data.net',
errorBeacon: 'staging-bam.nr-data.net',
},
staging: {
instrumentationType: 'proAndSPA',
accountId: '10175106',
trustKey: '1',
agentID: '22273531',
licenseKey: '23448da482',
applicationID: '22273531',
beacon: 'staging-bam.nr-data.net',
errorBeacon: 'staging-bam.nr-data.net',
},
},
},
},
],
};
7 changes: 7 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"gatsby-plugin-manifest": "^2.3.5",
"gatsby-plugin-mdx": "^1.2.11",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-newrelic": "newrelic/gatsby-plugin-newrelic.git#5cd42e832f0588764dc332ce7ebd05794de5106a",
"gatsby-plugin-offline": "^3.1.4",
"gatsby-plugin-react-helmet": "^3.2.4",
"gatsby-plugin-robots-txt": "^1.5.1",
Expand Down Expand Up @@ -57,6 +58,8 @@
"license": "MIT",
"scripts": {
"build": "gatsby build",
"build:production": "GATSBY_NEWRELIC_ENV=production gatsby build",
"build:staging": "GATSBY_NEWRELIC_ENV=staging gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
Expand Down

0 comments on commit 32e05bd

Please sign in to comment.