@serverless/sdk
Advanced tools
Comparing version 0.5.5 to 0.5.6
@@ -5,2 +5,8 @@ # Changelog | ||
### [0.5.6](https://github.com/serverless/console/compare/@serverless/sdk@0.5.5...@serverless/sdk@0.5.6) (2023-04-12) | ||
### Bug Fixes | ||
- SC-799 Added capture warning when spans are not closed ([#631](https://github.com/serverless/console/issues/631)) ([16f9a8b](https://github.com/serverless/console/commit/16f9a8b9ced92a39c4fcff9af50e50ee7315aa1c)) | ||
### [0.5.5](https://github.com/serverless/console/compare/@serverless/sdk@0.5.4...@serverless/sdk@0.5.5) (2023-04-06) | ||
@@ -7,0 +13,0 @@ |
@@ -113,3 +113,9 @@ 'use strict'; | ||
serverlessSdk._createTraceSpan = (name, options = {}) => new TraceSpan(name, options); | ||
serverlessSdk._createTraceSpan = (name, options = {}) => | ||
new TraceSpan( | ||
name, | ||
Object.assign(options, { | ||
_reportWarning: reportWarning, | ||
}) | ||
); | ||
serverlessSdk._reportError = reportError; | ||
@@ -116,0 +122,0 @@ serverlessSdk._reportWarning = reportWarning; |
@@ -46,2 +46,3 @@ 'use strict'; | ||
} | ||
this._reportWarning = options._reportWarning; | ||
this.startTime = startTime || defaultStartTime; | ||
@@ -89,2 +90,3 @@ this.name = ensureSpanName(name); | ||
immediateDescendants, | ||
_reportWarning: this._reportWarning, | ||
}); | ||
@@ -137,6 +139,6 @@ } | ||
if (leftoverSpans.length) { | ||
process.stderr.write( | ||
const message = | ||
"Serverless SDK Warning: Following trace spans didn't end before end of " + | ||
`lambda invocation: ${leftoverSpans.map(({ name }) => name).join(', ')}\n` | ||
); | ||
`lambda invocation: ${leftoverSpans.map(({ name }) => name).join(', ')}\n`; | ||
this._reportWarning(message, 'SDK_SPAN_NOT_CLOSED'); | ||
} | ||
@@ -143,0 +145,0 @@ asyncLocalStorage.enterWith(this); |
{ | ||
"name": "@serverless/sdk", | ||
"repository": "serverless/console", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"author": "Serverless, Inc.", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
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
73247
1427