Gathering detailed insights and metrics for opentelemetry-instrumentation-express
Gathering detailed insights and metrics for opentelemetry-instrumentation-express
Gathering detailed insights and metrics for opentelemetry-instrumentation-express
Gathering detailed insights and metrics for opentelemetry-instrumentation-express
@opentelemetry/instrumentation-express
OpenTelemetry instrumentation for `express` http web application framework
@aspecto/opentelemetry-instrumentation-express
enhanced open telemetry instrumentation for the `express` web framework
@opentelemetry/plugin-express
OpenTelemetry express automatic instrumentation package.
@pw-tech/instrumentation-hyper-express
OpenTelemetry hyper-express automatic instrumentation package
js extensions for the open-telemetry project
npm install opentelemetry-instrumentation-express
Typescript
Module System
Node Version
NPM Version
opentelemetry-span-transformations@0.41.0
Updated on May 21, 2024
opentelemetry-propagator-selective@0.31.0
Updated on May 21, 2024
opentelemetry-instrumentation-node-cache@0.41.0
Updated on May 21, 2024
opentelemetry-resource-detector-service@0.30.0
Updated on May 21, 2024
opentelemetry-instrumentation-neo4j@0.41.0
Updated on May 21, 2024
opentelemetry-instrumentation-kafkajs@0.41.0
Updated on May 21, 2024
TypeScript (99.85%)
JavaScript (0.15%)
Total Downloads
3,697,063
Last Day
1,866
Last Week
28,664
Last Month
124,719
Last Year
1,527,325
Apache-2.0 License
170 Stars
323 Commits
40 Forks
3 Watchers
10 Branches
24 Contributors
Updated on Jun 08, 2025
Minified
Minified + Gzipped
Latest Version
0.41.0
Package Id
opentelemetry-instrumentation-express@0.41.0
Unpacked Size
94.66 kB
Size
23.88 kB
File Count
24
NPM Version
lerna/8.1.3/node@v18.20.2+x64 (linux)
Node Version
18.20.2
Published on
May 21, 2024
Cumulative downloads
Total Downloads
Last Day
3.4%
1,866
Compared to previous day
Last Week
-2.2%
28,664
Compared to previous week
Last Month
4.6%
124,719
Compared to previous month
Last Year
7.7%
1,527,325
Compared to previous year
5
1
This module provide enhanced instrumentation for the express
web framework.
npm install --save opentelemetry-instrumentation-express
This instrumentation supports ^4.9.0
:
all versions >= 4.9.0
(released 2014) and < 5.0.0
(in alpha).
For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.
1const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); 2const { registerInstrumentations } = require('@opentelemetry/instrumentation'); 3const { ExpressInstrumentation } = require('opentelemetry-instrumentation-express'); 4 5const tracerProvider = new NodeTracerProvider(); 6tracerProvider.register(); 7 8registerInstrumentations({ 9 tracerProvider, 10 instrumentations: [ 11 new ExpressInstrumentation() 12 ] 13});
Express instrumentation has few options available to choose from. You can set the following:
Options | Type | Description |
---|---|---|
requestHook | RequestHook (function) | Hook for adding custom attributes before express start handling the request. Receives params: span, { moduleVersion, req, res } |
includeHttpAttributes | boolean | If set to true, plugin will include semantic http attributes in each express span |
Express auto instrumentation will create a single span per request with the following attributes. Detailed specification and cases can be found here.
http.route
This is a conventional http attribute, which is collected by express instead of the http module (which is not aware of the route). It will always contain path-parameterized data with low cardinality (no ids), but might be missing parts of the path in case of early termination or middlewares that accept any path.
Example: /api/users/:id
express.route.full
This attribute will always contain the entire path. The part of the path that has been consumed by express will be shown as is (parameterized), and the leftover will be concatenated after (due to early termination or middleware that accept any path).
Example: /api/users/:id/books/758734
(The :id
part was consumed, but the bookid
part was not).
express.route.configured
This attribute is relevant when user configures multi path options for the same middleware. It reduces even further the cardinality space compared to http.route
, and supply more info about how the app routing works.
Example: /api["/foo", /"bar"]
- meaning that the same endpoint is triggered by routes /api/foo
and /api/bar
.
express.route.params
This attribute holds a json stringified map, where the keys are the url path param names, and the values are the matched params from the actual url.
Example: {"id":"1234"}
.
express.unhandled
Set to true when request was not handled by any middleware in express, and got fallback to the default app finalhandler
. This can happen if client sent request with invalid path or method (resulting in 404). This can be useful to filter out requests from internet bots which try to call common routes on servers.
express.instrumentation.errors
In case of internal error in instrumentation, this attribute will contain the error description. There are no known valid use cases which are expected to produce this attribute.
route
data, in any valid express edge case. Contrib instrumentation does a good job for common cases, but miss nuances on complex setups.requestHook
for adding custom attributes to span, as well as ability to capture express version into user defined attribute.This extension (and many others) was developed by Aspecto with ❤️
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 18/30 approved changesets -- score normalized to 6
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-30
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