Skip to content

Latest commit

 

History

History

X-Ray

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Some X-Ray notes

| AWS X-Ray Daemon | aws/aws-xray-daemon | | AWS X-Ray SDK (Python) | aws/aws-xray-sdk-python |


Segment and subsegment in Lambda


SQS to Lambda

Update:

AWS X-Ray adds trace linking for event-driven applications built on Amazon SQS and AWS Lambda (https://aws.amazon.com/about-aws/whats-new/2022/11/aws-x-ray-trace-linking-event-driven-applications-amazon-sqs-lambda/)

Previous approach:

(Outdated): SQS supports X-Ray tracing but it does not propagate the trace to a Lambda function. Lambda always starts a new trace.-

See:

Workaround:

  • Create a new segment to replace the facade segment created by Lambda, and retrieve the trace ID and parent ID from the trace header (from the SQS segment).
  • Example: xray-sqs-to-lambda/handler.ts (xray-sqs-to-lambda