Docs are confusing when using lambda without express
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I am having a hard time figuring out xray for my lambda module, I do not create any subsegments and am using only the captureHTTPsGlobal to get request information and tracing, currently struggle buss'n through adding annotations and enabling xray for local development and testing.
Another issue i'm seeing is in xray I do not see any urls or methods displayed on the UI view but they do appear in the metadata.
Do I need to create a subsegment? If so do I need to close each subsegment? Are there any best practices for using the captureHTTPsGlobal or gotchas?
Another query or point of confusion I have is that I already have a separate unique v4uuid for my codebase that I use for logging and saving my data. I was hoping to be able to tie that in with xray and be able to view all parts of my system by the same v4uuid I already generate. Whats the best way to include this (annotation?). I was hoping it'd be as simple as giving the segment or subsegments that id when I create them (or by having the same parent id). Is there a common/global way to use my uuid or do I have to add it to every subsegment? How can I add it to the global http capture?
The docs state: "Currently, only Express applications are supported for automatic capturing. See the aws-xray-sdk-express package for additional information." - https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core. Is that accurate anymore?
It would be great to have some generic examples for lambdas without express. A lot of the docs seem to only reference express but there is a separate express module and readme. It'd be great if all the express examples were moved there. The docs also seem to be missing information on lambdas in general and how they initialize a root segment by default and they should only be used with Automatic mode.
Should there be an lambda package? With examples and docs? or should it be in core? (I'd love to give this a start but I'll need to request permission from my company first, does this resonate at all or am I completely offbase here?)
Thank you in advance!
Contributor guide
Assessment
This issue has not been assessed yet.