@serverless/sdk
Advanced tools
Comparing version 0.5.8 to 0.5.9
@@ -5,2 +5,12 @@ # Changelog | ||
### [0.5.9](https://github.com/serverless/console/compare/@serverless/sdk@0.5.8...@serverless/sdk@0.5.9) (2023-04-20) | ||
### Bug Fixes | ||
- Fix router middleware detection in Express instrumentation ([f89cc69](https://github.com/serverless/console/commit/f89cc69638e7bbe9820e355528ab0e138bae4a0a)) | ||
### Maintenance Improvements | ||
- Fix information in inline comment ([a7ea178](https://github.com/serverless/console/commit/a7ea178bbb1711ddb2b0afa7dee306c5037b60a7)) | ||
### [0.5.8](https://github.com/serverless/console/compare/@serverless/sdk@0.5.7...@serverless/sdk@0.5.8) (2023-04-14) | ||
@@ -7,0 +17,0 @@ |
@@ -7,4 +7,3 @@ # [`express`](https://expressjs.com/) app instrumentation | ||
Tracing is turned on automatically, assuming that `express` is loaded normally via Node.js `require`. | ||
If it comes bundled or imported via ESM import, then instrumentation needs to be turned on manually with following steps: | ||
Tracing is turned on automatically, assuming that `express` is loaded normally via Node.js `require`. If it comes bundled then instrumentation needs to be turned on manually with following steps: | ||
@@ -11,0 +10,0 @@ ```javascript |
@@ -23,3 +23,3 @@ # Serverless SDK | ||
Most of the instrumentation is setup automatically, still there are scenarios when it's difficult to ensure that (e.g. when target modules are imported as ESM, or come from bundles). In such case instrumentation need to be set manually. In context of `@serverless/sdk` following instrumentation extensions are provided: | ||
Most of the instrumentation is setup automatically, still there are scenarios when it's difficult to ensure that (e.g. when target modules are bundled). In such case instrumentation need to be set manually. In context of `@serverless/sdk` following instrumentation extensions are provided: | ||
@@ -26,0 +26,0 @@ - `.instrumentation.expressApp.install(express)` - Instrument Express. See [instrumentatiom/express-app](instrumentation/express-app.md) |
@@ -99,3 +99,3 @@ 'use strict'; | ||
if (!settings.disableExpressMonitoring) { | ||
// Auto generate AWS SDK request spans | ||
// Auto generate express middleware spans | ||
require('./lib/instrumentation/express').install(); | ||
@@ -102,0 +102,0 @@ } |
@@ -43,3 +43,3 @@ 'use strict'; | ||
const { routeSpan, openedSpans } = expressRouteData; | ||
const isRouterMiddleware = !routeSpan && this.name === 'bound dispatch'; | ||
const isRouterMiddleware = Boolean(!routeSpan && this.route); | ||
const middlewareSpanName = (() => { | ||
@@ -81,3 +81,5 @@ if (routeSpan) { | ||
middlewareSpan.close(); | ||
if (this.name === 'bound dispatch') delete expressRouteData.routeSpan; | ||
if (this.route) { | ||
delete expressRouteData.routeSpan; | ||
} | ||
} | ||
@@ -84,0 +86,0 @@ } catch (error) { |
{ | ||
"name": "@serverless/sdk", | ||
"repository": "serverless/console", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"author": "Serverless, Inc.", | ||
@@ -9,3 +9,3 @@ "dependencies": { | ||
"ext": "^1.7.0", | ||
"long": "^5.2.1", | ||
"long": "^5.2.3", | ||
"type": "^2.7.2", | ||
@@ -12,0 +12,0 @@ "uni-global": "^1.0.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79556
1576
Updatedlong@^5.2.3