Open francircle opened 2 months ago
I found that this can be altered by setting the environment variable DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED=true
but it looks like it may contain some bugs. I just sent the following message in the Datadog slack apm chanel: https://datadoghq.slack.com/archives/C3SH3KCQG/p1722447251471329
@jaridmargolin thanks for sharing this. What kind of bugs you encountered?
Datadog submitted a patch that fixed the issue I was seeing: https://github.com/DataDog/dd-trace-js/commit/3e179d010a20a501d9b62522f11e97ee5d3ccbe0
You should now be free to use DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED=true
. I'm not entirely sure why it isn't exposed as a config option.
Hi team,
According to Datadog docs, the trace ID has 128 bits by default, which is equivalent to 32 hex characters like
66884212000000004443333311122222
.I am able to see traceId like this in datadog, but for my
winston
logger, which instrumented by using dd-trace plugin like thisI see the trace id in
dd
object is in another format, it's a 19-digit decimal string like5295287788888597036
.After I dug in the source code in
dd-trace-js
, I found this piece of logicI saw the 19-digit decimal string is actually the lower half of trace ID in decimal format. I wonder why it returns decimal string by default instead of the 32 hex chars traceId like we see in datadog dashboard and why is the
get128bitId
isfalse
by default. Is there any reason behind this? Thanks!