We've recently begun adding in AWS Xray into our Spring project and had success utilizing the AWSXRayServletFilter
for creating Segments
to cover our client requests.
Now we've also begun adding in the AWS SDK Instrumentor to trace our usages of AWS services. One of which is SQS, which we use amazon-sqs-java-messaging-lib
to utilize JMS to receive SQS messages. This is where we are facing some trouble.
Every time our application attempts to get messages the TracingHandler
attempts to create a SubSegment
and fails because there is no Segment
already created. How can we wrap these requests in a Segment
? Wouldn't that information be contained in the message itself to link segments together from the resource that pushed the message to the queue?
I would have expected there to Context Missing strategy available to create a Segment if one is missing or at least pick up from a parent trace id but I don't see that information contained within their latest docs.