
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@dazn/lambda-powertools-middleware-log-timeout
Advanced tools
Middy middleware to log an error message when a function times out.
A Middy middleware that will log a timeout error message just before the function actually times out.
Main features:
invocation timed out
(with the invocation event as attribute) when an invocation times outInstall from NPM: npm install @dazn/lambda-powertools-middleware-log-timeout
Alternatively, if you use the template @dazn/lambda-powertools-pattern-basic
then this would be configured for you.
The middleware accepts an optional constructor parameter thresholdMillis
, which is the number of millis before an invocation is timed out, that an error message is logged. thresholdMillis
defaults to 10ms.
const middy = require('middy')
const logTimeout = require('@dazn/lambda-powertools-middleware-log-timeout')
const handler = async (event, context) => {
return 42
}
module.exports = middy(handler)
// or .use(logTimeout(50)) to log the timeout error message 50ms before invocation times out
.use(logTimeout()) // defaults to 10ms
}
It's recommended that you use the @dazn/lambda-powertools-pattern-basic
which configures this middleware along with other useful middlewares.
1.29.0 (2021-05-04)
FAQs
Middy middleware to log an error message when a function times out.
The npm package @dazn/lambda-powertools-middleware-log-timeout receives a total of 1,601 weekly downloads. As such, @dazn/lambda-powertools-middleware-log-timeout popularity was classified as popular.
We found that @dazn/lambda-powertools-middleware-log-timeout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.