Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions newrelic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'use strict';

/**
* New Relic agent configuration.
* See https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/
*/
exports.config = {
app_name: [process.env.NEW_RELIC_APP_NAME || 'drive-server-wip'],
license_key: process.env.NEW_RELIC_LICENSE_KEY,

logging: {
enabled: false,
},

// Enable if we require multi-service tracing in the future.
distributed_tracing: {
enabled: false,
},
transaction_tracer: {
enabled: false,
/* transaction_threshold: 500,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment

record_sql: 'obfuscated',
explain_threshold: 1000, */
},
span_events: {
enabled: true,
max_samples_stored: 1000,
},
transaction_events: {
max_samples_stored: 1000,
},
custom_insights_events: {
enabled: false,
},

slow_sql: {
enabled: true,
},
error_collector: {
enabled: true,
},
application_logging: {
enabled: false,
},

// Attribute filtering
// Rules must be camelCase per NR docs.
// Applies globally to transactions, spans, and error events.
attributes: {
exclude: [
'request.headers.accept',
'request.headers.contentLength',
'request.headers.contentType',
'request.headers.host',
'request.headers.referer',
'request.headers.userAgent',
'response.headers.contentLength',
'response.headers.contentType',
],
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"build": "nest build && cp newrelic.js dist/newrelic.js",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "cross-env NODE_ENV=production nest start -e 'node -r newrelic'",
"cleanup:retroactive": "ts-node -r tsconfig-paths/register src/modules/jobs/commands/retroactive-deleted-items-cleanup.command.ts",
Expand Down
Loading