I am trying to trace a request in spring boot application. I am running AWS X-Ray
Daemon locally which is listing on UDP port 2000 but it is not sending the trace data to the AWS X-Ray
. My application is a standalone application which does some processing and is not a web-based application so I can't use the X-Ray
servlet filter to trace request. Anyone knows the how trace request in non-web based spring boot application with AWS XRay
?
Asked
Active
Viewed 871 times
2

AbdulAhmad Matin
- 1,047
- 1
- 18
- 27

Sagar Chavan
- 21
- 2
1 Answers
0
There are various of public APIs for creating segment manually: https://docs.aws.amazon.com/xray-sdk-for-java/latest/javadoc/.
By default the X-Ray recorder uses ThreadLocal
to store the created segments so anywhere in the same thread you can easily access the segment and add data to it. You can wrap the entire work done by a segment (which is equivalent to a X-Ray servlet filter would do for a web app request/response cycle) and then create subsegments for subtasks as usual.

haotian465
- 679
- 3
- 4