Description
AWS has introduced response streaming for AWS Lambda functions a while ago.
Sentry's wrapHandler is not equipped to handle this, as the parameters passed to the handler event, responseStream, context are different to the traditional event, context, [callback] parameters.
Known workarounds
While this is being worked on, you can use the following approach (thank you for providing this @JQuezada0)
export const handler = awslambda.streamifyResponse(
async function (event, responseStream, context) {
const sentryHandler = SentryServerless.wrapHandler(async function () {
return sstHandlerModule.handler(event, responseStream, context);
});
return sentryHandler(event, context, () => undefined);
},
);
Description
AWS has introduced response streaming for AWS Lambda functions a while ago.
Sentry's
wrapHandleris not equipped to handle this, as the parameters passed to the handlerevent, responseStream, contextare different to the traditionalevent, context, [callback]parameters.Known workarounds
While this is being worked on, you can use the following approach (thank you for providing this @JQuezada0)