You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
LeifW
changed the title
OTSpanContex.toTraceId() truncates 128-bit TraceIds.
OTSpanContex.toTraceId() truncates 128-bit TraceIds to 64-bit decimal.
Nov 20, 2024
You cannot get the 128-bit trace identifier from the OpenTracing API. You will only have the 64 lower bits as an integer.
What is your use case that needs it?
It seems you are using the dd-trace-api dependency too, right?
If so, you can call the static methods CorrelationIdentifier.getTraceId() and CorrelationIdentifier.getSpanId() to get the IDs to inject into logs.
OpenTelemetry API will also support the 128-bit trace IDs, but OpenTracing will only give you access to the first 64-bit.
The
toTraceId()
method on OTSpanContext calls.toString()
on theDDTraceId
, which the Javadoc for says "Returns a 64-bit only decimal String representation of the DDTraceId".So how do we get the original 128-bit hexadecimal TraceId?
The text was updated successfully, but these errors were encountered: