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

@opentelemetry/sdk-node

Package Overview
Dependencies
Maintainers
4
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/sdk-node

OpenTelemetry SDK for Node.js

  • 0.11.1-alpha.15
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-23.21%
Maintainers
4
Weekly downloads
 
Created

What is @opentelemetry/sdk-node?

The @opentelemetry/sdk-node package is part of the OpenTelemetry project, which aims to provide a set of APIs, libraries, agents, and instrumentation to provide observability for applications. Specifically, the @opentelemetry/sdk-node package is designed for Node.js applications and allows developers to collect traces and metrics, and export them to various observability backends for analysis. This helps in monitoring applications, understanding performance bottlenecks, and troubleshooting issues.

What are @opentelemetry/sdk-node's main functionalities?

Tracing

This feature allows the collection of trace data, which represents the lifecycle of a request through the system. The code sample initializes a tracer provider, sets up a span processor with a Jaeger exporter, and registers the provider. This setup enables the tracing of operations and requests, facilitating the monitoring and debugging of distributed systems.

const { NodeTracerProvider } = require('@opentelemetry/sdk-node');
const { SimpleSpanProcessor } = require('@opentelemetry/tracing');
const { JaegerExporter } = require('@opentelemetry/exporter-jaeger');

const provider = new NodeTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new JaegerExporter()));
provider.register();

Metrics

This feature enables the collection and export of metrics data, such as counters, gauges, and histograms. The code sample demonstrates how to set up a MeterProvider with a Prometheus exporter, which collects metrics data and makes it available for scraping by Prometheus at a specified port. This is useful for monitoring application performance and resource usage.

const { MeterProvider } = require('@opentelemetry/sdk-node');
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');

const meterProvider = new MeterProvider({
  exporter: new PrometheusExporter({ port: 9464 }),
  interval: 1000
});
meterProvider.start();

Other packages similar to @opentelemetry/sdk-node

Keywords

FAQs

Package last updated on 21 Sep 2020

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