@hypertrace/nodejsagent
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -19,3 +19,3 @@ "use strict"; | ||
this.noFrameworks = () => { | ||
return (this.frameworks['sails'] || this.frameworks['nestjs'] || this.frameworks['koa'] || this.frameworks['hapi'] || this.frameworks['express']); | ||
return (this.frameworks['sails'] || this.frameworks['@nestjs/core'] || this.frameworks['koa'] || this.frameworks['@hapi/hapi'] || this.frameworks['express']); | ||
}; | ||
@@ -22,0 +22,0 @@ this.available = (mod) => { |
@@ -83,7 +83,11 @@ "use strict"; | ||
// in that case we dont want to enter scope until we have captured | ||
// @ts-ignore | ||
span.inHtCaptureScope = capturedChunk; | ||
if (span) { | ||
// @ts-ignore | ||
span.inHtCaptureScope = capturedChunk; | ||
} | ||
let ret = original.apply(this, arguments); | ||
// @ts-ignore | ||
span.inHtCaptureScope = false; | ||
if (span) { | ||
// @ts-ignore | ||
span.inHtCaptureScope = false; | ||
} | ||
return ret; | ||
@@ -90,0 +94,0 @@ }; |
@@ -9,2 +9,3 @@ "use strict"; | ||
const config_1 = require("../../config/config"); | ||
const Logging_1 = require("../../Logging"); | ||
let patched = false; | ||
@@ -54,5 +55,10 @@ const shimmer = require('shimmer'); | ||
patched = true; | ||
const hapiResponse = require('@hapi/hapi/lib/response'); | ||
shimmer.wrap(hapiResponse, 'wrap', HapiWrapWithConfig(config_1.Config.getInstance())); | ||
try { | ||
const hapiResponse = require('@hapi/hapi/lib/response'); | ||
shimmer.wrap(hapiResponse, 'wrap', HapiWrapWithConfig(config_1.Config.getInstance())); | ||
} | ||
catch (e) { | ||
Logging_1.logger.debug("Could not configure hapi response listener - continuing without hapi instrumentation"); | ||
} | ||
} | ||
exports.patchHapi = patchHapi; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const ExpressWrapper_1 = require("./ExpressWrapper"); | ||
const Logging_1 = require("../../Logging"); | ||
function sailsErrorHandlerSetup() { | ||
@@ -20,4 +21,9 @@ const sails = require('sails'); | ||
} | ||
sailsErrorHandlerSetup(); | ||
try { | ||
sailsErrorHandlerSetup(); | ||
} | ||
catch (e) { | ||
Logging_1.logger.debug("Could not configure sails listener - continuing without sails instrumentation"); | ||
} | ||
} | ||
exports.patchSails = patchSails; |
{ | ||
"name": "@hypertrace/nodejsagent", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "Hypertrace Node.js Agent", | ||
@@ -37,3 +37,3 @@ "author": "Traceable Inc.", | ||
"@opentelemetry/sdk-trace-node": "1.0.1", | ||
"import-in-the-middle": "^1.2.0", | ||
"import-in-the-middle": "^1.4.2", | ||
"loglevel": "^1.8.0", | ||
@@ -43,5 +43,5 @@ "loglevel-plugin-prefix": "^0.8.4", | ||
"opentelemetry-instrumentation-mongoose": "^0.26.1", | ||
"protobufjs": "^6.11.2", | ||
"require-in-the-middle": "^5.1.0", | ||
"semver": "^7.3.5", | ||
"protobufjs": "^6.11.4", | ||
"require-in-the-middle": "5.1.0", | ||
"semver": "^7.5.4", | ||
"shimmer": "^1.2.1", | ||
@@ -101,3 +101,3 @@ "yaml": "^1.10.2" | ||
"next-version": "semantic-release --dry-run | grep 'The next release version is' | grep -oEi \"\\s([0-9].*)$\" | xargs", | ||
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' HT_LOG_LEVEL=DEBUG mocha -r ts-node/register 'test/**/*.ts'", | ||
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' HT_LOG_LEVEL=DEBUG mocha -r ts-node/register 'test/**/*.ts' --exclude 'test/integration/**/*.*'", | ||
"build": "tsc && npm pack", | ||
@@ -104,0 +104,0 @@ "coverage": "nyc --reporter=lcov npm run test", |
411451
7556
+ Addedrequire-in-the-middle@5.1.0(transitive)
- Removedrequire-in-the-middle@5.2.0(transitive)
Updatedimport-in-the-middle@^1.4.2
Updatedprotobufjs@^6.11.4
Updatedrequire-in-the-middle@5.1.0
Updatedsemver@^7.5.4