diff --git a/lib/instrumentation/index.js b/lib/instrumentation/index.js index 18e2d92a6ea..b7eb3577984 100644 --- a/lib/instrumentation/index.js +++ b/lib/instrumentation/index.js @@ -291,7 +291,7 @@ Instrumentation.prototype._startHook = function () { if (!isHandlingLambda && basedir) { pkg = path.join(basedir, 'package.json') try { - version = JSON.parse(fs.readFileSync(pkg)).version + version = JSON.parse(fs.readFileSync(pkg, 'utf8')).version } catch (e) { self._agent.logger.debug('could not shim %s module: %s', name, e.message) return exports