@instana/aws-lambda
Advanced tools
Comparing version 1.83.0 to 1.84.0
{ | ||
"name": "@instana/aws-lambda", | ||
"version": "1.83.0", | ||
"version": "1.84.0", | ||
"description": "Instana tracing and monitoring for Node.js based AWS Lambdas", | ||
@@ -61,4 +61,4 @@ "author": { | ||
"dependencies": { | ||
"@instana/core": "^1.83.0", | ||
"@instana/serverless": "^1.83.0" | ||
"@instana/core": "^1.84.0", | ||
"@instana/serverless": "^1.84.0" | ||
}, | ||
@@ -75,3 +75,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "319fcb06f2c3cbc1c8bec3ecaeef7308d4754b06" | ||
"gitHead": "cef49c57404f4ebb2b346561aff2b4e44a5e54be" | ||
} |
@@ -105,2 +105,41 @@ 'use strict'; | ||
// The functions context.done, context.succeed, and context.fail constitute a deprecated legacy Lambda API from the | ||
// very first incarnations of the Node.js Lambda execution environment from ca. 2016. Although it is not documented | ||
// anymore in the AWS Lambda docs, it still works (and is also used by some customers). See | ||
// eslint-disable-next-line max-len | ||
// https://web.archive.org/web/20161216092320/https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-using-old-runtime.html | ||
// for information about it. | ||
const originalDone = context.done; | ||
context.done = (originalError, originalResult) => { | ||
if (handlerHasFinished) { | ||
return; | ||
} | ||
handlerHasFinished = true; | ||
postHandler(entrySpan, originalError, originalResult, () => { | ||
originalDone(originalError, originalResult); | ||
}); | ||
}; | ||
const originalSucceed = context.succeed; | ||
context.succeed = originalResult => { | ||
if (handlerHasFinished) { | ||
return; | ||
} | ||
handlerHasFinished = true; | ||
postHandler(entrySpan, undefined, originalResult, () => { | ||
originalSucceed(originalResult); | ||
}); | ||
}; | ||
const originalFail = context.fail; | ||
context.fail = originalError => { | ||
if (handlerHasFinished) { | ||
return; | ||
} | ||
handlerHasFinished = true; | ||
postHandler(entrySpan, originalError, undefined, () => { | ||
originalFail(originalError); | ||
}); | ||
}; | ||
let handlerPromise; | ||
@@ -107,0 +146,0 @@ try { |
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
31552
708
Updated@instana/core@^1.84.0
Updated@instana/serverless@^1.84.0