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)
exportconsthandler=awslambda.streamifyResponse(asyncfunction(event,responseStream,context){constsentryHandler=SentryServerless.wrapHandler(asyncfunction(){returnsstHandlerModule.handler(event,responseStream,context);});returnsentryHandler(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)