Skip to content

Commit 719427d

Browse files
committed
psh
1 parent aadfba0 commit 719427d

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

lib/ProcessUtils.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
module.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')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
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",

0 commit comments

Comments
 (0)