mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Configured New Relic to load earlier in the process
refs https://github.com/TryGhost/DevOps/issues/68 - we want New Relic to be one of the first modules to load so it can instrument the rest of our code - previously this would not have been the case, and it would have missed out on instrumenting the config and logging code - this moves the require to be the first step in the process if the PRO_ENV env var is set
This commit is contained in:
parent
cbe3070476
commit
eb718276e8
2 changed files with 5 additions and 7 deletions
|
@ -477,13 +477,6 @@ async function bootGhost({backend = true, frontend = true, server = true} = {})
|
|||
try {
|
||||
// Step 1 - require more fundamental components
|
||||
|
||||
// Load New Relic
|
||||
debug('Begin: Load New Relic');
|
||||
if (config.get('newRelic:enabled')) {
|
||||
require('newrelic');
|
||||
}
|
||||
debug('End: Load New Relic');
|
||||
|
||||
// Sentry must be initialized early, but requires config
|
||||
debug('Begin: Load sentry');
|
||||
require('./shared/sentry');
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
// Load New Relic
|
||||
if (process.env.PRO_ENV) {
|
||||
require('newrelic');
|
||||
}
|
||||
|
||||
require('./ghost');
|
||||
|
|
Loading…
Add table
Reference in a new issue