Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/context-async-hooks

Package Overview
Dependencies
Maintainers
3
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/context-async-hooks - npm Package Compare versions

Comparing version 0.8.3 to 0.9.0

15

build/src/AsyncHooksContextManager.d.ts

@@ -1,16 +0,1 @@

/*!
* Copyright 2019, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ContextManager, Context } from '@opentelemetry/context-base';

@@ -17,0 +2,0 @@ export declare class AsyncHooksContextManager implements ContextManager {

7

build/src/AsyncHooksContextManager.js
"use strict";
/*!
* Copyright 2019, OpenTelemetry Authors
/*
* Copyright The OpenTelemetry Authors
*

@@ -18,2 +18,3 @@ * Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncHooksContextManager = void 0;
const context_base_1 = require("@opentelemetry/context-base");

@@ -43,3 +44,3 @@ const asyncHooks = require("async_hooks");

var _a;
return _a = this._stack[this._stack.length - 1], (_a !== 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.Context.ROOT_CONTEXT;
}

@@ -46,0 +47,0 @@ with(context, fn) {

"use strict";
/*
* Copyright 2020, OpenTelemetry Authors
* Copyright The OpenTelemetry Authors
*

@@ -17,7 +17,14 @@ * Licensed under the Apache License, Version 2.0 (the "License");

*/
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./AsyncHooksContextManager"));
__exportStar(require("./AsyncHooksContextManager"), exports);
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

export declare const VERSION = "0.8.3";
export declare const VERSION = "0.9.0";
//# sourceMappingURL=version.d.ts.map
"use strict";
/*
* Copyright 2020, OpenTelemetry Authors
* Copyright The OpenTelemetry Authors
*

@@ -18,4 +18,5 @@ * Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.8.3';
exports.VERSION = '0.9.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/context-async-hooks",
"version": "0.8.3",
"version": "0.9.0",
"description": "OpenTelemetry AsyncHooks-based Context Manager",

@@ -44,17 +44,17 @@ "main": "build/src/index.js",

"devDependencies": {
"@types/mocha": "^7.0.0",
"@types/node": "^14.0.5",
"@types/shimmer": "^1.0.1",
"codecov": "^3.6.1",
"gts": "^2.0.0",
"mocha": "^7.1.2",
"nyc": "^15.0.0",
"rimraf": "^3.0.0",
"ts-mocha": "^7.0.0",
"ts-node": "^8.6.2",
"typescript": "3.7.2"
"@types/mocha": "7.0.2",
"@types/node": "14.0.13",
"@types/shimmer": "1.0.1",
"codecov": "3.7.0",
"gts": "2.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-node": "8.10.2",
"typescript": "3.9.5"
},
"dependencies": {
"@opentelemetry/context-base": "^0.8.3"
"@opentelemetry/context-base": "^0.9.0"
}
}
# OpenTelemetry AsyncHooks-based Context Manager
[![Gitter chat][gitter-image]][gitter-url]

@@ -10,3 +11,3 @@ [![NPM Published Version][npm-img]][npm-url]

## What is a ContextManager ?
## What is a ContextManager

@@ -29,3 +30,4 @@ The definition and why they exist is available on [the readme of the context-base package][def-context-manager].

Context propagation is a big subject when talking about tracing in NodeJS, if you want more information about that here are some resources:
- https://www.npmjs.com/package/continuation-local-storage (which was the old way of doing context propagation)
- <https://www.npmjs.com/package/continuation-local-storage> (which was the old way of doing context propagation)
- Datadog's own implementation for their Javascript tracer: [here][dd-js-tracer-scope]

@@ -35,4 +37,4 @@ - OpenTracing implementation: [here][opentracing-scope]

## Useful links
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>

@@ -39,0 +41,0 @@ - For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc