Ask HN: Distributed Tracing in Node.js?
Hi all,
I worked for a company more than 1 year which most of our stack is using Node.js architected in micro-service way.
I found difficulty on finding the best way for tracing context and error (distributed tracing) to detect issue faster. Anyone has experienced this too and been willing to share the way for dealing with this in production system?
P.S: I believe most people usually passing context in function call and combine it with open tracing. But I'm not sure if there are any better ways than that in Node.js. Example of distributed tracing in Golang: https://www.youtube.com/watch?v=nm2A80PfYww In JS you use (if using zipkin) https://github.com/openzipkin/zipkin-js/tree/master/packages.... If you have further questions, feel free to come to https://gitter.im/openzipkin/zipkin and people will help you with more details. > I believe most people usually passing context in function call and combine it with open tracing. What about that is not working for you? I haven't used Node at all but I imagine it would work about the same as described in the video you linked. I believe that's working but it's kind of pain because we need to passing context across function call. So I wonder whether there is better way to do that. I believe node.js has async_hook feature that can capture context without passing function call, but it's still in experimental phase and won't work for tracing Like I said I've never worked with Node but being explicit seems like a better pattern than having some background async process do it.