@serverless/sdk
Advanced tools
Comparing version 0.5.20 to 0.5.21
@@ -30,2 +30,3 @@ import ExpressAppInstrument from './instrumentation/express-app'; | ||
setTag(name: string, value: boolean | number | string | Date | Array<unknown> | null): undefined; | ||
setEndpoint(endpoint: string): undefined; | ||
} | ||
@@ -32,0 +33,0 @@ |
@@ -5,2 +5,8 @@ # Changelog | ||
### [0.5.21](https://github.com/serverless/console/compare/@serverless/sdk@0.5.20...@serverless/sdk@0.5.21) (2023-08-01) | ||
### Features | ||
- Add setEndpoint to SDK ([e67efc6](https://github.com/serverless/console/commit/e67efc6b67bb5063d970b1b14c6228780cc78777)) | ||
### [0.5.20](https://github.com/serverless/console/compare/@serverless/sdk@0.5.19...@serverless/sdk@0.5.20) (2023-06-07) | ||
@@ -7,0 +13,0 @@ |
@@ -62,2 +62,5 @@ 'use strict'; | ||
}; | ||
serverlessSdk.setEndpoint = (endpoint) => { | ||
serverlessSdk._userDefinedEndpoint = endpoint; | ||
}; | ||
@@ -64,0 +67,0 @@ // Private |
@@ -31,3 +31,7 @@ 'use strict'; | ||
const rootSpan = serverlessSdk.traceSpans.root; | ||
if (rootSpan && expressRouteData.path) { | ||
if (rootSpan && serverlessSdk._userDefinedEndpoint) { | ||
rootSpan.tags.delete('aws.lambda.http_router.path'); | ||
rootSpan.tags.set('aws.lambda.http_router.path', serverlessSdk._userDefinedEndpoint); | ||
} | ||
if (rootSpan && expressRouteData.path && !serverlessSdk._userDefinedEndpoint) { | ||
// Override eventual API Gateway's `resourcePath` | ||
@@ -34,0 +38,0 @@ rootSpan.tags.delete('aws.lambda.http_router.path'); |
{ | ||
"name": "@serverless/sdk", | ||
"repository": "serverless/console", | ||
"version": "0.5.20", | ||
"version": "0.5.21", | ||
"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
89482
1698