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

@opentelemetry/context-zone-peer-dep

Package Overview
Dependencies
Maintainers
3
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/context-zone-peer-dep

OpenTelemetry Context Zone with peer dependency for zone.js

  • 1.29.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
231K
increased by20.52%
Maintainers
3
Weekly downloads
 
Created

What is @opentelemetry/context-zone-peer-dep?

@opentelemetry/context-zone-peer-dep is a package that provides context management capabilities using Zone.js. It is part of the OpenTelemetry project, which is a set of APIs, libraries, agents, and instrumentation to provide observability for applications.

What are @opentelemetry/context-zone-peer-dep's main functionalities?

Context Management

This feature allows you to manage context using Zone.js. The code sample demonstrates how to set the global context manager to use ZoneContextManager, create a new context, and run a function within that context.

const { context, setGlobalContextManager } = require('@opentelemetry/api');
const { ZoneContextManager } = require('@opentelemetry/context-zone-peer-dep');

// Set the global context manager to use ZoneContextManager
setGlobalContextManager(new ZoneContextManager());

// Create a new context
const ctx = context.active().setValue('key', 'value');

// Run a function within the context
context.with(ctx, () => {
  console.log(context.active().getValue('key')); // Outputs: 'value'
});

Other packages similar to @opentelemetry/context-zone-peer-dep

Keywords

FAQs

Package last updated on 04 Dec 2024

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