Skip to content

Support AWS Lambda Response Streaming #15774

Description

@andreiborza

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);},);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions