How to tracing a request through a chain of microservices end-to-end?

喜夏-厌秋 提交于 2020-01-13 17:10:13

问题


I am using OpenCensus in Go to push tracing data to Stackdriver for calls involving a chain of 2 or more micro services and I noticed that I get many traces which contain spans only for certain services but not the entire end to end call.

At the moment I attribute this to the fact that not all calls are traced (only a certain sample) and each service decides whether to trace its current span or not.

Is this the way it is intended to work? Is there any way to make sure when a trace is sampled, it is done so by all services in the call chain?


回答1:


Architecturally I will say when you are developing your microservices make sure your API Gateway creates a unique id like GUID, which gets propagated through all the microservices & similarly you make sure that you have log aggregator which will be collecting logs from all the services & finally you are getting nice tracebility of request.



来源:https://stackoverflow.com/questions/57894336/how-to-tracing-a-request-through-a-chain-of-microservices-end-to-end

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!