|
| 1 | +'use strict'; |
| 2 | +/** |
| 3 | + * New Relic agent configuration. |
| 4 | + * |
| 5 | + * See lib/config/default.js in the agent distribution for a more complete |
| 6 | + * description of configuration variables and their potential values. |
| 7 | + */ |
| 8 | +exports.config = { |
| 9 | + /** |
| 10 | + * Array of application names. |
| 11 | + */ |
| 12 | + app_name: ['YOUR_PROJECT_NAME'], |
| 13 | + /** |
| 14 | + * Your New Relic license key. |
| 15 | + */ |
| 16 | + license_key: 'YOUR_NEW_RELIC_LICENSE_KEY', |
| 17 | + /** |
| 18 | + * This setting controls distributed tracing. |
| 19 | + * Distributed tracing lets you see the path that a request takes through your |
| 20 | + * distributed system. Enabling distributed tracing changes the behavior of some |
| 21 | + * New Relic features, so carefully consult the transition guide before you enable |
| 22 | + * this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing |
| 23 | + * Default is true. |
| 24 | + */ |
| 25 | + distributed_tracing: { |
| 26 | + /** |
| 27 | + * Enables/disables distributed tracing. |
| 28 | + * |
| 29 | + * @env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED |
| 30 | + */ |
| 31 | + enabled: true, |
| 32 | + }, |
| 33 | + logging: { |
| 34 | + /** |
| 35 | + * Level at which to log. 'trace' is most useful to New Relic when diagnosing |
| 36 | + * issues with the agent, 'info' and higher will impose the least overhead on |
| 37 | + * production applications. |
| 38 | + */ |
| 39 | + level: 'debug', |
| 40 | + }, |
| 41 | + /** |
| 42 | + * When true, all request headers except for those listed in attributes.exclude |
| 43 | + * will be captured for all traces, unless otherwise specified in a destination's |
| 44 | + * attributes include/exclude lists. |
| 45 | + */ |
| 46 | + allow_all_headers: true, |
| 47 | + attributes: { |
| 48 | + /** |
| 49 | + * Prefix of attributes to exclude from all destinations. Allows * as wildcard |
| 50 | + * at end. |
| 51 | + * |
| 52 | + * NOTE: If excluding headers, they must be in camelCase form to be filtered. |
| 53 | + * |
| 54 | + * @env NEW_RELIC_ATTRIBUTES_EXCLUDE |
| 55 | + */ |
| 56 | + exclude: [ |
| 57 | + 'request.headers.cookie', |
| 58 | + 'request.headers.authorization', |
| 59 | + 'request.headers.proxyAuthorization', |
| 60 | + 'request.headers.setCookie*', |
| 61 | + 'request.headers.x*', |
| 62 | + 'response.headers.cookie', |
| 63 | + 'response.headers.authorization', |
| 64 | + 'response.headers.proxyAuthorization', |
| 65 | + 'response.headers.setCookie*', |
| 66 | + 'response.headers.x*', |
| 67 | + ], |
| 68 | + }, |
| 69 | + |
| 70 | + application_logging: { |
| 71 | + forwarding: { |
| 72 | + enabled: true, |
| 73 | + }, |
| 74 | + }, |
| 75 | +}; |
0 commit comments