Open jpicara opened 6 months ago
Indeed trace context propagation is supported as exposed.
time=2024-05-17T10:42:09.377Z level=DEBUG msg="Linux kernel version" component=nethttp.Tracer major=5 minor=10
time=2024-05-17T10:42:09.377Z level=DEBUG msg="checking kernel lockdown mode, [none] allows us to propagate trace context" component=ebpf.ProcessTracer
time=2024-05-17T10:42:09.377Z level=DEBUG msg="can't find /sys/kernel/security/lockdown, assuming no lockdown" component=ebpf.ProcessTracer
time=2024-05-17T10:42:09.377Z level=DEBUG msg="Kernel not in lockdown mode, trace context propagation is supported." component=nethttp.Tracer
time=2024-05-17T10:42:09.377Z level=DEBUG msg="Linux kernel version" component=grpc.Tracer major=5 minor=10
time=2024-05-17T10:42:09.377Z level=DEBUG msg="checking kernel lockdown mode, [none] allows us to propagate trace context" component=ebpf.ProcessTracer
time=2024-05-17T10:42:09.377Z level=DEBUG msg="can't find /sys/kernel/security/lockdown, assuming no lockdown" component=ebpf.ProcessTracer
time=2024-05-17T10:42:09.377Z level=DEBUG msg="Kernel not in lockdown mode, trace context propagation is supported." component=grpc.Tracer
Hi @jpicara,
There are some limitations in what Beyla can do related to trace ID propagation, some of which will be resolved in the next couple of releases, but let me first ask couple of questions and explain better.
Traceparent
for the header information. https://www.w3.org/TR/trace-context/. We don't support other or custom traceheaders at the moment, and the format must match what Traceparent has. We could add parsing of other headers in the future, but that would be a feature request. When Beyla doesn't find the Traceparent
field in the headers, it generates a new one, which is why you see random IDs.X-Trace-Token
header to Traceparent
and make sure the format matches what W3C says about the field, Beyla will pick it up. If your application is written Go then this is automatic, for other languages this will require that you enable the parsing of request headers: https://grafana.com/docs/beyla/latest/configure/options/#ebpf-tracer BEYLA_BPF_TRACK_REQUEST_HEADERS
. The reason we need this option separately enabled is because it might add some overhead, which is now much reduced than our original support, but it requires Linux kernel 5.17. I see that you are running on 5.10, so this may now work well for you if you are not using Go for the applications.Please let me know if you have more questions, happy to help!
Hey, Wo, thanks for your detailed response. Much appreciated!
Hello!, I would like to report the following issue we are suffering. We have deployed Beyla, Agent and Tempo in our testing environment and from what I have observed, we are not able to correlate the traceID set into the trace headers with the traceID got from Beyla itself. As an example.
Doing a simple curl to specific endpoint I can get the headers
However the same trace in Beyla is marked with some random? traceID 147c58703a0a4df9e052bf86d5026785. Is there any way to patch the traceID with our X-Trace-Token or X-B3-TraceId? In addition to that, this traceID and SpanID set by beyla is somehow random? Thanks in advance!