Skip to content

Commit

Permalink
feat: Installed newrelic
Browse files Browse the repository at this point in the history
  • Loading branch information
alesancor1 authored Feb 12, 2023
1 parent 24cd96f commit c9b3803
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ RUN npm install --only=prod
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV

# New Relic config
RUN apk add python
ENV NEW_RELIC_NO_CONFIG_FILE=true
ENV NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
ENV NEW_RELIC_LOG=stdout

ARG PORT=80
ENV PORT $PORT
EXPOSE $PORT
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

if (process.env.NEW_RELIC_APP_NAME && process.env.NEW_RELIC_LICENSE_KEY) require('newrelic');

const governify = require('governify-commons');
const logger = governify.getLogger().tag('index');

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"js-yaml": "^3.3.0",
"mustache": "^4.0.1",
"oas-tools": "^2.1.4",
"sinon": "^11.1.1"
"sinon": "^11.1.1",
"newrelic": "latest"
},
"devDependencies": {
"mocha": "^7.1.1",
Expand Down

0 comments on commit c9b3803

Please sign in to comment.