I am currently adding aws xray support to a bunch of pieces of software that talk to each other. As far as I can tell, I can log incoming and outgoing traces for each. But is it worth it to log the outgoing traces of one piece, if I am logging the incoming traces at the other end? Does this provide any more information? It feels like i should just stick with either always doing outgoing or incoming and not double up on each piece. It just seems like overkill to log them on both ends. Any insight is greatly appreciated! Thanks
it is always recommended to trace both incoming and outgoing requests on each of your services. The importance of the outgoing traces is it propagates the Tracing header to the downstream services, which includes the trace id, the sampling decision, etc.. For any request, each of your service should send a trace segment with the same trace id to form an entire trace that represents the request lifecycle as it travels through your application.
Speak of "logging" traces, if you are referring logging the trace segment document, I don't think it's necessary to log both incoming and outgoing traces because the incoming one is the parent segment and it contains the outgoing one.