Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTSpanContex.toTraceId() truncates 128-bit TraceIds to 64-bit decimal. #7988

Open
LeifW opened this issue Nov 20, 2024 · 1 comment
Open

Comments

@LeifW
Copy link

LeifW commented Nov 20, 2024

The toTraceId() method on OTSpanContext calls .toString() on the DDTraceId, 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?

@LeifW LeifW changed the title OTSpanContex.toTraceId() truncates 128-bit TraceIds. OTSpanContex.toTraceId() truncates 128-bit TraceIds to 64-bit decimal. Nov 20, 2024
@PerfectSlayer
Copy link
Contributor

Hello @LeifW

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants