File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 22
33module . exports = {
44 injectModules : function ( ) {
5- // if (process.env.pmx !== 'false') {
6- // const pmx = require('@pm2/io')
5+ if ( process . env . pmx !== 'false' ) {
6+ const pmx = require ( '@pm2/io' )
77
8- // let conf = {}
9- // const hasSpecificConfig = typeof process.env.io === 'string' || process.env.trace === 'true'
10- // // pmx is already init, no need to do it twice
11- // if (hasSpecificConfig === false) return
8+ let conf = { }
9+ const hasSpecificConfig = typeof process . env . io === 'string' || process . env . trace === 'true'
10+ // pmx is already init, no need to do it twice
11+ if ( hasSpecificConfig === false ) return
1212
13- // if (process.env.io) {
14- // const io = JSON.parse(process.env.io)
15- // conf = io.conf ? io.conf : conf
16- // }
17- // pmx.init(Object.assign({
18- // tracing: process.env.trace === 'true' || false
19- // }, conf))
20- // }
13+ if ( process . env . io ) {
14+ const io = JSON . parse ( process . env . io )
15+ conf = io . conf ? io . conf : conf
16+ }
17+ pmx . init ( Object . assign ( {
18+ tracing : process . env . trace === 'true' || false
19+ } , conf ) )
20+ }
2121 } ,
2222 isESModule ( exec_path ) {
2323 var fs = require ( 'fs' )
Original file line number Diff line number Diff line change 170170 "dependencies" : {
171171 "@pm2/agent" : " ~2.1.1" ,
172172 "@pm2/js-api" : " ~0.8.0" ,
173- "@pm2/io" : " github:pahann/pm2-io-apm#feat-otel-built " ,
173+ "@pm2/io" : " latest " ,
174174 "@pm2/pm2-version-check" : " latest" ,
175175 "ansis" : " 4.0.0-node10" ,
176176 "async" : " 3.2.6" ,
You can’t perform that action at this time.
0 commit comments