Skip to content

Commit

Permalink
Switch to Elastic APM Node agent
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Jul 13, 2017
1 parent da47b96 commit 9efa857
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .workload.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use strict'

var opbeat = require('opbeat').start({
appId: process.env.WORKLOAD_OPBEAT_APP_ID,
organizationId: process.env.WORKLOAD_OPBEAT_ORG_ID,
secretToken: process.env.WORKLOAD_OPBEAT_SECRET_TOKEN,
apiHost: process.env.WORKLOAD_OPBEAT_API_HOST,
apiPort: process.env.WORKLOAD_OPBEAT_API_PORT,
apiHttps: process.env.WORKLOAD_OPBEAT_API_HTTPS,
appName: process.env.WORKLOAD_OPBEAT_APP_NAME,
active: process.env.NODE_ENV === 'production'
})

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ Setup the following environment variables:
- `PGUSER` - PostgreSQL database username
- `PGPASSWORD` - PostgreSQL database password
- `PGDATABASE` - PostgreSQL database name (defaults to `opbeans`)
- `OPBEAT_ORGANIZATION_ID` - Opbeat Organization Id for the server app
- `OPBEAT_APP_ID` - Opbeat App Id for the server app
- `OPBEAT_SECRET_TOKEN` - Opbeat Secret Token for the server app
- `OPBEAT_API_HOST` - APM Receiver API hostname (defaults to
`localhost`)
- `OPBEAT_API_PORT` - APM Receiver API port (defaults to `8080`)
- `OPBEAT_API_HTTPS` - APM Receiver API port (defaults to `false`)
- `OPBEAT_APP_NAME` - Opbeat App Name for the server app
- `REACT_APP_OPBEAT_APP_ID` - Opbeat App Id for the client app
- `REACT_APP_OPBEAT_ORG_ID` - Opbeat Organization Id for the client app

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"body-parser": "^1.15.2",
"concurrently": "^3.1.0",
"express": "^4.14.0",
"opbeat": "^4.4.0",
"opbeat": "opbeat/opbeat-node#elastic-agent",
"pg": "^6.1.2",
"redis": "^2.6.3",
"request": "^2.79.0",
Expand Down
2 changes: 1 addition & 1 deletion server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ switch (env) {
conf.server.url = 'http://localhost:' + conf.server.port
break
case 'production':
conf.server.url = 'http://www.opbeans.com'
conf.server.url = 'https://opbeans-elastic.herokuapp.com'
break
default:
throw new Error('Unknown environment: ' + env)
Expand Down

0 comments on commit 9efa857

Please sign in to comment.