Gathering detailed insights and metrics for @opentelemetry/sdk-trace-node
Gathering detailed insights and metrics for @opentelemetry/sdk-trace-node
Gathering detailed insights and metrics for @opentelemetry/sdk-trace-node
Gathering detailed insights and metrics for @opentelemetry/sdk-trace-node
OpenTelemetry JavaScript Client
npm install @opentelemetry/sdk-trace-node
Typescript
Module System
Min. Node Version
Node Version
NPM Version
semconv/v1.36.0
Updated on Jul 10, 2025
experimental/v0.203.0
Updated on Jul 09, 2025
experimental/v0.202.0
Updated on Jun 02, 2025
semconv/v1.34.0
Updated on May 21, 2025
semconv/v1.33.1
Updated on May 20, 2025
experimental/v0.201.1
Updated on May 19, 2025
TypeScript (96.75%)
JavaScript (2.95%)
Jinja (0.21%)
Shell (0.08%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
3,027 Stars
2,718 Commits
909 Forks
53 Watchers
17 Branches
338 Contributors
Updated on Jul 11, 2025
Latest Version
2.0.1
Package Id
@opentelemetry/sdk-trace-node@2.0.1
Unpacked Size
35.48 kB
Size
9.29 kB
File Count
15
NPM Version
lerna/6.6.2/node@v18.20.8+x64 (linux)
Node Version
18.20.8
Published on
May 15, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This module provides automated instrumentation and tracing for Node.js applications.
For manual instrumentation see the @opentelemetry/sdk-trace-base package.
Note: Much of OpenTelemetry JS documentation is written assuming the compiled application is run as CommonJS. For more details on ECMAScript Modules vs CommonJS, refer to esm-support.
This package exposes a NodeTracerProvider
.
For loading instrumentations please use registerInstrumentations
function from opentelemetry-instrumentation
OpenTelemetry comes with a growing number of instrumentation plugins for well known modules (see supported modules) and an API to create custom instrumentation (see the instrumentation developer guide).
Please note: This module does not bundle any plugins. They need to be installed separately.
This is done by wrapping all tracing-relevant functions.
This instrumentation code will automatically
Additionally to automated instrumentation, NodeTracerProvider
exposes the same API as @opentelemetry/sdk-trace-base, allowing creating custom spans if needed.
1npm install --save @opentelemetry/api 2npm install --save @opentelemetry/sdk-trace-node 3 4# Install instrumentation plugins 5npm install --save @opentelemetry/instrumentation-http 6# and for example one additional 7npm install --save @opentelemetry/instrumentation-graphql
The following code will configure the NodeTracerProvider
to instrument http
(and any other installed supported
modules)
using @opentelemetry/plugin-http
.
1const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 2const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); 3 4// Create and configure NodeTracerProvider 5const provider = new NodeTracerProvider(); 6 7// Initialize the provider 8provider.register(); 9 10// register and load instrumentation and old plugins - old plugins will be loaded automatically as previously 11// but instrumentations needs to be added 12registerInstrumentations({ 13}); 14 15// Your application code - http will automatically be instrumented if 16// @opentelemetry/plugin-http is present 17const http = require('http');
In the following example:
requestHook
1const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 2const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); 3const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express'); 4 5const provider = new NodeTracerProvider(); 6provider.register(); 7 8// register and load instrumentation and old plugins - old plugins will be loaded automatically as previously 9// but instrumentations needs to be added 10registerInstrumentations({ 11 instrumentations: [ 12 new ExpressInstrumentation(), 13 new HttpInstrumentation({ 14 requestHook: (span, request) => { 15 span.setAttribute("custom request hook attribute", "request"); 16 }, 17 }), 18 ], 19}); 20 21
See how to automatically instrument http and gRPC / grpc-js using node-sdk.
Apache 2.0 - See LICENSE for more information.
No vulnerabilities found.
Reason
update tool detected
Details
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
SAST tool is run on all commits
Details
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
29 out of 29 merged PRs checked by a CI test -- score normalized to 10
Reason
project has 43 contributing companies or organizations
Details
Reason
Found 29/30 approved changesets -- score normalized to 9
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-10T21:08:34Z
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More