@opentelemetry/context-async-hooks
Advanced tools
Comparing version 0.11.1-alpha.48 to 0.12.0
@@ -16,2 +16,3 @@ import { Context } from '@opentelemetry/context-base'; | ||
* @param uid id of the async context | ||
* @param type the resource type | ||
*/ | ||
@@ -18,0 +19,0 @@ private _init; |
@@ -37,3 +37,3 @@ "use strict"; | ||
var _a; | ||
return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : context_base_1.Context.ROOT_CONTEXT; | ||
return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : context_base_1.ROOT_CONTEXT; | ||
} | ||
@@ -63,4 +63,11 @@ with(context, fn) { | ||
* @param uid id of the async context | ||
* @param type the resource type | ||
*/ | ||
_init(uid) { | ||
_init(uid, type) { | ||
// ignore TIMERWRAP as they combine timers with same timeout which can lead to | ||
// false context propagation. TIMERWRAP has been removed in node 11 | ||
// every timer has it's own `Timeout` resource anyway which is used to propagete | ||
// context. | ||
if (type === 'TIMERWRAP') | ||
return; | ||
const context = this._stack[this._stack.length - 1]; | ||
@@ -67,0 +74,0 @@ if (context !== undefined) { |
@@ -29,3 +29,3 @@ "use strict"; | ||
var _a; | ||
return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : context_base_1.Context.ROOT_CONTEXT; | ||
return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : context_base_1.ROOT_CONTEXT; | ||
} | ||
@@ -32,0 +32,0 @@ with(context, fn) { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.11.1-alpha.48+15174c6"; | ||
export declare const VERSION = "0.12.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.11.1-alpha.48+15174c6'; | ||
exports.VERSION = '0.12.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/context-async-hooks", | ||
"version": "0.11.1-alpha.48+15174c6", | ||
"version": "0.12.0", | ||
"description": "OpenTelemetry AsyncHooks-based Context Manager", | ||
@@ -54,9 +54,9 @@ "main": "build/src/index.js", | ||
"ts-mocha": "7.0.0", | ||
"ts-node": "8.10.2", | ||
"ts-node": "9.0.0", | ||
"typescript": "3.9.7" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/context-base": "^0.11.1-alpha.48+15174c6" | ||
"@opentelemetry/context-base": "^0.12.0" | ||
}, | ||
"gitHead": "15174c6647ab9863dfc1424412fa60f2fddb3351" | ||
"gitHead": "3f72613a36b6f97555a0fa7481755cf8b6cce1a7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
40442
441
0
+ Added@opentelemetry/context-base@0.12.0(transitive)
- Removed@opentelemetry/context-base@0.11.1-alpha.48(transitive)