-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I plan to to build a backend trace library, not only tracing the HTTP requests, that collects the span information of every method in the path and POST to zipkin server. Is it possible to do it?
I think it needs a wrapper before each method to collect time cost and send spans to another backend server. The backend server can analyze the spans, generate a trace and send to Zipkin server.
The hard part is how to keep an identical traceID through the path and make each span include its parent ID in the path. With a backend server, I can create a stack that keeps tracking the methods being called. Add to stack before calling the method and pop out when finishing the method. However, if two traces happen at the same time(asynchronous), the stack would be a messy.