Content-Length: 215385 | pFad | http://github.com/getsentry/sentry-javascript/issues/15774

78 Support AWS Lambda Response Streaming · Issue #15774 · getsentry/sentry-javascript · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AWS Lambda Response Streaming #15774

Open
andreiborza opened this issue Mar 21, 2025 · 0 comments
Open

Support AWS Lambda Response Streaming #15774

andreiborza opened this issue Mar 21, 2025 · 0 comments
Labels
Package: aws-serverless Issues related to the Sentry AWS Serverless SDK

Comments

@andreiborza
Copy link
Member

andreiborza commented Mar 21, 2025

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);
  },
);
@andreiborza andreiborza added the Package: aws-serverless Issues related to the Sentry AWS Serverless SDK label Mar 21, 2025
@andreiborza andreiborza marked this as a duplicate of #12815 Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: aws-serverless Issues related to the Sentry AWS Serverless SDK
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/getsentry/sentry-javascript/issues/15774

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy