aws / aws/aws-xray-sdk-ruby

activating aws_sdk patching affects Lambda responses sometimes

Open
#11 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
60
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I use the `aws-sdk-lambda` gem to invoke Lambda functions with the `Aws::Lambda::Client#invoke` method. My functions return JSON strings which then get parsed.

Recently I added X-Ray via the `aws-xray-sdk` gem and found that if I activate the `net_http` and `aws_sdk` patches the response of the Lambda functions sometimes gets scrambled. One or more of the last bytes are appended to the end which leads to a parsing error.
AFAICS this happens to longer responses (around 1K) only but not to short (around 100 bytes) ones. Also when retrying the invocation immediately the response is unscrambled.
When disabling the `aws_sdk` patch this does not seem to happen.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.