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

@opentelemetry/scope-async-hooks

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/scope-async-hooks

OpenTelemetry AsyncHooks-based Scope Manager

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-68.09%
Maintainers
4
Weekly downloads
 
Created
Source

OpenTelemetry AsyncHooks-based Scope Manager

Gitter chat NPM Published Version dependencies devDependencies Apache License

This package provides async-hooks based scope manager which is used internally by OpenTelemetry plugins to propagate specific scope between function calls and async operations. It only targets NodeJS since async-hooks is only available there.

What is a ScopeManager ?

The definition and why they exist is available on the readme of the scope-base package.

Implementation in NodeJS

NodeJS has a specific API to track async scope: async-hooks, it allows to track creation of new async operation and their respective parent. This package only handle storing a specific object for a given async hooks context.

Limitations

Even if the API is native to NodeJS, it doesn't cover all possible cases of scope propagation but there is a big effort from the NodeJS team to fix those. That's why we generally advise to be on the latest LTS to benefit from performance and bug fixes.

There are known modules that break scope propagation (some of them are listed there), so it's possible that the scope manager doesn't work with them.

Prior arts

Context propagation is a big subject when talking about tracing in NodeJS, if you want more informations about that here are some resources:

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Package last updated on 04 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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