Gathering detailed insights and metrics for @opentelemetry/plugin-express
Gathering detailed insights and metrics for @opentelemetry/plugin-express
Gathering detailed insights and metrics for @opentelemetry/plugin-express
Gathering detailed insights and metrics for @opentelemetry/plugin-express
OpenTelemetry instrumentation for JavaScript modules
npm install @opentelemetry/plugin-express
Typescript
Module System
Min. Node Version
Node Version
NPM Version
83.5
Supply Chain
98.1
Quality
79.3
Maintenance
100
Vulnerability
100
License
instrumentation-restify: v0.48.1
Updated on Jun 12, 2025
instrumentation-redis: v0.49.1
Updated on Jun 12, 2025
instrumentation-net: v0.46.1
Updated on Jun 12, 2025
instrumentation-mongodb: v0.55.1
Updated on Jun 12, 2025
instrumentation-koa: v0.50.1
Updated on Jun 12, 2025
instrumentation-hapi: v0.49.0
Updated on Jun 12, 2025
TypeScript (97.58%)
JavaScript (2.42%)
Shell (0.01%)
Total Downloads
2,351,084
Last Day
182
Last Week
4,336
Last Month
16,910
Last Year
190,081
Apache-2.0 License
805 Stars
2,357 Commits
584 Forks
16 Watchers
8 Branches
293 Contributors
Updated on Jul 02, 2025
Minified
Minified + Gzipped
Latest Version
0.15.0
Package Id
@opentelemetry/plugin-express@0.15.0
Size
10.89 kB
NPM Version
lerna/3.22.1/node@v14.8.0+x64 (darwin)
Node Version
14.8.0
Published on
Apr 05, 2021
Cumulative downloads
Total Downloads
Last Day
-41.3%
182
Compared to previous day
Last Week
-11.3%
4,336
Compared to previous week
Last Month
13.1%
16,910
Compared to previous month
Last Year
-25.1%
190,081
Compared to previous year
3
This module provides automatic instrumentation for express
.
For automatic instrumentation see the @opentelemetry/node package.
1npm install --save @opentelemetry/plugin-express
^4.0.0
OpenTelemetry Express Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.
To load a specific plugin (express in this case), specify it in the registerInstrumentations's configuration.
1const { NodeTracerProvider } = require('@opentelemetry/node');
2const { registerInstrumentations } = require('@opentelemetry/instrumentation');
3
4const provider = new NodeTracerProvider();
5provider.register();
6
7registerInstrumentations({
8 instrumentations: [
9 {
10 plugins: {
11 express: {
12 enabled: true,
13 // You may use a package name or absolute path to the file.
14 path: '@opentelemetry/plugin-express',
15 }
16 }
17 },
18 ],
19 tracerProvider: provider,
20});
21
To load all the supported plugins, use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.
1const { NodeTracerProvider } = require('@opentelemetry/node'); 2const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 3 4const provider = new NodeTracerProvider(); 5provider.register(); 6registerInstrumentations({ 7 tracerProvider: provider, 8});
See examples/express for a short example.
Because of the way express works, it's hard to correctly compute the time taken by asynchronous middlewares and request handlers. For this reason, the time you'll see reported for asynchronous middlewares and request handlers will only represent the synchronous execution time, and not any asynchronous work.
Express plugin has few options available to choose from. You can set the following:
Options | Type | Description |
---|---|---|
ignoreLayers | IgnoreMatcher[] | Express plugin will not trace all layers that match. |
ignoreLayersType | ExpressLayerType[] | Express plugin will ignore the layers that match based on their type. |
For reference, here are the three different layer type:
router
is the name of express.Router()
middleware
request_handler
is the name for anything thats not a router or a middleware.Apache 2.0 - See LICENSE for more information.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
all changesets reviewed
Reason
30 commit(s) and 13 issue activity found in the last 90 days -- score normalized to 10
Reason
update tool detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
30 out of 30 merged PRs checked by a CI test -- score normalized to 10
Reason
project has 42 contributing companies or organizations
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-02T21:47:05Z
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