@aws-sdk/middleware-recursion-detection 3.922.0 → 3.933.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,7 +18,8 @@ const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
|
18
18
|
}
|
|
19
19
|
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
|
|
20
20
|
const traceIdFromEnv = process.env[ENV_TRACE_ID];
|
|
21
|
-
const
|
|
21
|
+
const invokeStore = await lambda_invoke_store_1.InvokeStore.getInstanceAsync();
|
|
22
|
+
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
|
22
23
|
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
|
23
24
|
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
24
25
|
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
|
|
@@ -15,7 +15,8 @@ export const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
|
15
15
|
}
|
|
16
16
|
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
|
|
17
17
|
const traceIdFromEnv = process.env[ENV_TRACE_ID];
|
|
18
|
-
const
|
|
18
|
+
const invokeStore = await InvokeStore.getInstanceAsync();
|
|
19
|
+
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
|
19
20
|
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
|
20
21
|
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
21
22
|
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-recursion-detection",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.933.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-recursion-detection",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/types": "3.
|
|
28
|
-
"@aws/lambda-invoke-store": "^0.
|
|
29
|
-
"@smithy/protocol-http": "^5.3.
|
|
30
|
-
"@smithy/types": "^4.
|
|
27
|
+
"@aws-sdk/types": "3.930.0",
|
|
28
|
+
"@aws/lambda-invoke-store": "^0.2.0",
|
|
29
|
+
"@smithy/protocol-http": "^5.3.5",
|
|
30
|
+
"@smithy/types": "^4.9.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|