Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new relic #9

Merged
merged 2 commits into from
Jan 21, 2025
Merged
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
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ SYNCHRONIZE=false
LOGGING=true
PORT=4000
INDEXER_URL=https://grants-stack-indexer-v2.gitcoin.co/
NODE_ENV=development
NODE_ENV=development

NEW_RELIC_APP_NAME=retrofunding-api
NEW_RELIC_LICENSE_KEY=XXXXXXXXXXXXX
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ temp/
logs/
.env
.eslintcache
schema.graphql
schema.graphql
*.log
59 changes: 59 additions & 0 deletions newrelic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
'use strict';

/**
* New Relic agent configuration.
* This configuration reads sensitive information from environment variables.
*/
exports.config = {
/**
* Array of application names.
*/
app_name: [process.env.NEW_RELIC_APP_NAME || 'default-app-name'],

/**
* Your New Relic license key.
*/
license_key: process.env.NEW_RELIC_LICENSE_KEY || 'your-default-license-key',

/**
* Logging configuration.
*/
logging: {
/**
* Level at which to log. 'trace' is most useful for diagnosing issues with
* the agent, 'info' and higher will impose the least overhead on production
* applications.
*/
level: process.env.NEW_RELIC_LOG_LEVEL || 'info',
},

/**
* Distributed Tracing.
* Enables distributed tracing, which lets you see the path requests take
* through your distributed system.
*/
distributed_tracing: {
enabled: true,
},

/**
* Error Collector configuration.
* Controls how the agent collects information about errors.
*/
error_collector: {
enabled: true,
},

/**
* Custom Insights configuration.
* Controls how custom events are sent to New Relic Insights.
*/
insights: {
enabled: true,
},

/**
* Allow using environment variables for sensitive data.
*/
allow_all_headers: true,
};
Loading
Loading