Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@opentelemetry/node
Advanced tools
OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications
This module provides automated instrumentation and tracing for Node.js applications.
For manual instrumentation see the @opentelemetry/tracing package.
This package exposes a NodeTracer
that will automatically hook into the module loader of Node.js.
For this to work, please make sure that NodeTracer
is initialized before any other module of your application, (like http
or express
) is loaded.
OpenTelemetry comes with a growing number of instrumentation plugins for well know modules (see supported modules) and an API to create custom plugins (see the plugin developer guide).
Whenever a module is loaded NodeTracer
will check if a matching instrumentation plugin has been installed.
Please note: This module does not bundle any plugins. They need to be installed separately.
If the respective plugin was found, it will be used to patch the original module to add instrumentation code. This is done by wrapping all tracing-relevant functions.
This instrumentation code will automatically
In short, this means that this module will use provided plugins to automatically instrument your application to produce spans and provide end-to-end tracing by just adding a few lines of code.
Additionally to automated instrumentation, NodeTracer
exposes the same API as @opentelemetry/tracing, allowing creating custom spans if needed.
npm install --save @opentelemetry/core
npm install --save @opentelemetry/node
# Install instrumentation plugins
npm install --save @opentelemetry/plugin-http
npm install --save @opentelemetry/plugin-grpc
npm install --save @opentelemetry/plugin-https
The following code will configure the NodeTracer
to instrument http
using @opentelemetry/plugin-http
.
const opentelemetry = require('@opentelemetry/core');
const { NodeTracer } = require('@opentelemetry/node');
// Create and configure NodeTracer
const tracer = new NodeTracer({
plugins: {
http: {
enabled: true,
// You may use a package name or absolute path to the file.
path: '@opentelemetry/plugin-http',
// http plugin options
}
}
});
// Initialize the tracer
opentelemetry.initGlobalTracer(tracer);
// Your application code - http will automatically be instrumented if
// @opentelemetry/plugin-http is present
const http = require('http');
To enable instrumentation for all supported modules, create an instance of NodeTracer
without providing any plugin configuration to the constructor.
const opentelemetry = require('@opentelemetry/core');
const { NodeTracer } = require('@opentelemetry/node');
// Create and initialize NodeTracer
const tracer = new NodeTracer();
// Initialize the tracer
opentelemetry.initGlobalTracer(tracer);
// Your application code
// ...
See how to automatically instrument http and gRPC using node-sdk.
Apache 2.0 - See LICENSE for more information.
0.3.0
Released 2019-12-13
opentelemetry-core
, opentelemetry-node
, opentelemetry-plugin-dns
, opentelemetry-plugin-document-load
, opentelemetry-plugin-grpc
, opentelemetry-plugin-postgres
, opentelemetry-plugin-redis
, opentelemetry-tracing
, opentelemetry-types
opentelemetry-plugin-document-load
opentelemetry-plugin-http
, opentelemetry-plugin-https
opentelemetry-core
, opentelemetry-metrics
, opentelemetry-types
opentelemetry-metrics
opentelemetry-core
, opentelemetry-plugin-document-load
, opentelemetry-tracing
, opentelemetry-web
opentelemetry-exporter-jaeger
opentelemetry-plugin-dns
opentelemetry-plugin-http
opentelemetry-shim-opentracing
main
in package.jsonopentelemetry-exporter-zipkin
opentelemetry-plugin-grpc
opentelemetry-core
opentelemetry-plugin-mongodb-core
opentelemetry-metrics
opentelemetry-plugin-redis
opentelemetry-exporter-prometheus
opentelemetry-types
opentelemetry-plugin-postgres
opentelemetry-core
, opentelemetry-exporter-collector
opentelemetry-node
, opentelemetry-plugin-mysql
opentelemetry-plugin-redis
opentelemetry-plugin-mongodb-core
opentelemetry-exporter-prometheus
opentelemetry-metrics
opentelemetry-scope-zone-peer-dep
, opentelemetry-scope-zone
, opentelemetry-web
opentelemetry-core
, opentelemetry-plugin-document-load
opentelemetry-core
, opentelemetry-metrics
, opentelemetry-types
opentelemetry-metrics
, opentelemetry-types
FAQs
OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications
The npm package @opentelemetry/node receives a total of 24,227 weekly downloads. As such, @opentelemetry/node popularity was classified as popular.
We found that @opentelemetry/node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.