Open PedroMBPinheiro opened 4 years ago
Hi @PedroMBPinheiro,
Are you sure that running pip install
through your buildspec.yml
will actually work in Lambda? I wasn't able to find much public documentation about Code Suite's integration with Lambda, so the buildspec.yml
might not be compatible with serverless environments. I would recommend bundling the X-Ray SDK package with your application code manually and uploading that bundle to Lambda. Alternatively, you could place the X-Ray SDK into a Lambda layer and include that layer in your Lambda function.
Hi @willarmiros,
By following https://docs.aws.amazon.com/codestar/latest/userguide/customize-project-xray.html I can enable XRay to work for the default segments and subsegments, but it does not accept me adding my own subsegments in code since it does not recognize the module.
If there is an official way to enable XRay in CodeStar, it should also accept custom subsegments in code, and avoid all the extra packaging and layer.
It would be nice to have this by default, in a PFR.
The documentation there does describe the official way of enabling X-Ray in CodeStar. It allows CodeStar to automatically generate and send segments and subsegments to X-Ray's backend without any further action from the customer and without forcing customers who are satisfied with the generated segments to add a dependency on the aws-xray-sdk
.
This integration, therefore, is independent of adding the SDK to your project to generate custom subsegments and segments. As far as I know, you do still need to bundle the SDK with your Lambda code as I described above.
What do you mean by a PFR?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.
Hi,
I am using AWS Codestar to develop a python lambda function.
I added X-Ray support following https://docs.aws.amazon.com/codestar/latest/userguide/customize-project-xray.html and added pip install aws-xray-sdk to my buildspec.yml
Add instrumented my code as per https://docs.aws.amazon.com/lambda/latest/dg/python-tracing.html.
But CloudWatch Logs always show this error.
There is no requirements.txt by default in CodeStar projects. What is missing here?