You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to setup individual subsegments for a dynamoDB and SQS call to see their individual performance.
My project is in Java using Micronaut and GraalVM (I followed these steps to add the needed classes for reflection to work)
After doing so I was able to see subsegment traces for SQS but when I add in a subsegment for dynamoDB call, I no longer see the SQS subsegment info for that trace.
After debugging a bit I see the parent traceIDs are the same for both but at the end of the call, there is only one subsegment added to the current segment which is the dynamo one.
Here are the way my current subsegments are setup:
I know I need to also close the subsegment in case of exception but for testing purposes I haven't done so yet and all my request are successful so far.
Thanks @willarmiros, I may try that out again for this project but in the case where we want to also instrument a non AWS service we may leverage subsegments so definitely would be helpful if we are able to get it working.
I did eventually get the subsegments to show up by encapsulating both subsegments under another subsegment.
`
Subsegment subsegment = AWSXRay.beginSubsegment("processing start");
//would contain trace for dynamo from the inital post
checkMessageExists(...)
//would contain trace for sqs from the inital post
sendSQSMessage(...)
AWSXray.endSubsegment(subsegment)
`
However if I had the individual subsegments in each method without wrapping in another subsegment it seems whichever subsegment that began and ended first was added whereas the other subsegment did not get logged with xray.
So in this case I would usually see the DB subsegment but not the sqs subsegment.
Not sure why the wrapping would make it work and the individual subsegment seems to stop after the first one is finished
Hi all,
I'm currently trying to setup individual subsegments for a dynamoDB and SQS call to see their individual performance.
My project is in Java using Micronaut and GraalVM (I followed these steps to add the needed classes for reflection to work)
After doing so I was able to see subsegment traces for SQS but when I add in a subsegment for dynamoDB call, I no longer see the SQS subsegment info for that trace.
After debugging a bit I see the parent traceIDs are the same for both but at the end of the call, there is only one subsegment added to the current segment which is the dynamo one.
Here are the way my current subsegments are setup:
SQS
`
I know I need to also close the subsegment in case of exception but for testing purposes I haven't done so yet and all my request are successful so far.
DynamoDb
`
The text was updated successfully, but these errors were encountered: