Open eddiesiegel opened 4 years ago
👋 @eddiesiegel, your scenario looks correct, and distributed tracing should be picking up your header correctly. I'll take a look and try to reproduce this issue.
Is there any update on this. Were you able to reproduce this? I am experiencing a similar issue.
@matthewberends, most of the code around distributed_tracing
has changed since the issue was first reported.
Could you provide us with the ddtrace
version you are using, and any relevant configuration options you have set (Datadog.configure do |c|...
, environment variables related to distributed tracing or propagation)?
We are using ddtrace version 0.34.2 with the following configuration:
The upstream service (nginx) is setting/sending the
x-datadog-trace-id
header, but the value of the header is being ignored and ddtrace is generating its own trace IDs.We have verified this by logging both the value of
request.headers['X-Datadog-Trace-Id']
andDatadog.tracer.active_correlation.trace_id
, and the two values disagree with one another.Example log line:
{"method":"GET","path":"/","format":"html","controller":"HomeController","action":"landing","status":302,"duration":1996.72,"view":0.0,"db":1961.96,"location":"redacted","time":"2020-07-02 16:45:46 +0000","params":{},"dd":{"trace_id":"4688686075633624864","span_id":"1802778151391069052","trace_id_header":"1-5efe0f38-e571148bdf112dc08b872635"},"user_id":1234}
dd.trace_id
is the trace ID reported by Datadog, anddd.trace_id_header
is the value in the header.