Open velvia opened 2 years ago
Specifics on trace contexts: headers vary by protocol.
I think that now we do all these nice things! No?
Not yet, unless @mystenmark or @bmwill added trace headers to gRPC
No we do not do all these nice things yet, but we can now trivially add things to HTTP headers in grpc calls. So the part that's missing is actually threading through traceids and the like
This is a follow-up to #620 to implement distributed tracing.
To do distributed tracing, the rough idea is that we have a master span, say one for an entire transaction execution in the gateway/client. All spans belonging to that transaction, in both client and authority, would go under that master span. To make that happen, we propagate the context from the gateway where the master span is initiated, to the authority with the transaction. Basically, the trace-id and span-id of the master span, which is auto generated.
A few things to look at:
It might be possible to generate a trace ID from the TX digest or other fields of the transaction, but I'm not sure.
Specific things:
context_from_digest
inbase_types.rs
was supposed to create a Trace Context from just the TX digest, but I think the trace parent is being created in the wrong format. It probably needs to be the trace ID of the overall span that is propagated.Old issue on implementing distributed tracing in Tokio: