I have been trying to figure out from documentation and practical tests how to pass an OpenTelemetry (parent) trace id from a client connected to FoundationDB, so that FoundationDB server would emit spans with the same trace ids and that client spans would become parent spans.
Is this even possible? There is no explicit mention in documentation or in the original announcement.
What I have tried so far:
using the SPAN_PARENT transaction option
writing the special keys \xff\xff/tracing/transaction_id and \xff\xff/tracing/token, in their expected format
I am also setting the --tracer parameter for fdbserver, and the corresponding network option for the client, plus knob_tracing_sample_rate=1.0, without any success.
I can see that client is receiving the trace id but it doesn’t seem to be sent to server as a SpanContextMessage mutation.
I see you added documentation on the SPAN_PARENT transaction option. Thank you for that!
@gm42 Did you ever get FDB traces working end-to-end from Application → FDB client (libfdb.so) → FDB server?
Currently, I’m setting \xff\xff/tracing/token to b"true", and TransactionOption::SpanParent using the format described in your documentation. That results in a single Transaction span from FoundationDB (presumably libfdb.so), but nothing from the FDB server. I tried setting \xff\xff/tracing/transaction_id but it did not have an effect.
Interestingly enough, if I set the sample rate knob to 1.0 (begin; setknob tracing_sample_rate 1.0; commit "sample rate") , I see some full FDB server traces, but they’re not connected to any client spans, and are presumably for transactions initiated internally within FDB itself
No; sorry for the late reply, I got pretty much at the same level of progress as you did.
Only detail I can add is that there is tracing information emitted by the server and tracing information emitted by the client-side (libfdbc.so), and I suppose that both must match for tracing spans to work.
One of the experiments I wanted to try was to use a different SDK (e.g. C++) to see if somehow it’s easier to make this work there.