Open dion-conqa opened 1 year ago
Jira CommentId: 211906 Commented by svengala:
Our existing Lambda/serverless products are in maintenance mode. We are re evaluating the strategy for support and will realign once confirmed.
This issue won't be actioned.
New Relic:
Monitor your Lambda Response Streaming with New Relic https://docs.newrelic.com/whats-new/2023/04/whats-new-04-07-lambda-streaming/
Also New Relic:
Support for Lambdas with response streaming This issue won't be actioned.
😭
Adding NR monitoring to a lambda with a response stream breaks the response stream.
Description
We are converting a function from Elastic Beanstalk to a lambda with response streaming. The only reason this function has been running on EB is because the response payload can be greater than 6MB.
When adding the New Relic agent, we have found that wrapping the handler function in
newrelic.setLambdaHandler
causes theresponseStream
parameter to be undefined when the lambda runs.For this lambda we aren't using the lambda layer. I haven't tested with the layer, but I would expect the same behaviour.
Expected Behavior
responseStream
won't be affected by the handler function being wrapped in thenewrelic.setLambdaHandler
function.Steps to Reproduce
Create a lambda with a response stream. Aws have examples here https://github.com/aws-samples/serverless-patterns/tree/main/lambda-streaming-ttfb-write-sam
Add the New Relic agent to the package.json
Wrap the handler in the
newrelic.setLambdaHandler
function.Check if
responseStream
is undefinedYour Environment
AWS Lambda x86
Additional context