TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (buffer.js:331:9)
at ContextCarrier._this.decode (/app/v7-mopower/node_modules/skywalking-backend-js/src/trace/context/ContextCarrier.ts:43:19)
at ContextCarrier.set (/app/v7-mopower/node_modules/skywalking-backend-js/src/trace/context/ContextCarrier.ts:61:32)
at /app/v7-mopower/node_modules/skywalking-backend-js/src/trace/context/ContextCarrier.ts:88:95
at Array.forEach (<anonymous>)
at Function.ContextCarrier.from (/app/v7-mopower/node_modules/skywalking-backend-js/src/trace/context/ContextCarrier.ts:88:66)
at Server._sw_request (/app/v7-mopower/node_modules/skywalking-backend-js/src/plugins/HttpPlugin.ts:151:40)
at Server.emit (events.js:315:20)
at Server.<anonymous> (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/src/metrics/httpMetrics.ts:181:25)
at parserOnIncoming (_http_server.js:790:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
import agent from 'skywalking-backend-js';
export class M7Skywalking {
static tryLoad(serviceName: string) {
if (!process.env.SW_AGENT_NAME || !serviceName) {
return;
}
agent.start();
}
}