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

Stop trimming leading 0s on span ids #2060

Closed
joe-elliott opened this issue Feb 2, 2023 · 1 comment · Fixed by #2062
Closed

Stop trimming leading 0s on span ids #2060

joe-elliott opened this issue Feb 2, 2023 · 1 comment · Fixed by #2062
Assignees
Milestone

Comments

@joe-elliott
Copy link
Member

Describe the bug
After some discussion with Grafana on this issue:
grafana/grafana#62725

We decided that the best fix is for Tempo to start returning span ids with leading 0s.

@joe-elliott joe-elliott added this to the v2.0.1 milestone Feb 2, 2023
@joe-elliott joe-elliott assigned joe-elliott and ie-pham and unassigned joe-elliott Feb 2, 2023
@joe-elliott
Copy link
Member Author

Currently we are repurposing TraceIDToHexString() here:
https://github.com/grafana/tempo/blob/main/pkg/traceql/engine.go#L129

To convert a byte slice to a hex string. We should create a new method SpanIDToHexString() that does not strip leading 0s and use it instead. Also search the codebase for any other places we may have used TraceIDToHexString() for span ids and replace with this new method.

SpanIDs are 8 bytes/64 bits of information, but this new method should handle cases where the slice has a shorter length. The output result should always be 16 hex characters long.

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

Successfully merging a pull request may close this issue.

2 participants