8000 [Bugfix] Fix search by trace id and span id by ruslan-mikhailov · Pull Request #5331 · grafana/tempo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bugfix] Fix search by trace id and span id #5331

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ruslan-mikhailov
Copy link
Contributor
@ruslan-mikhailov ruslan-mikhailov commented Jun 27, 2025

What this PR does:

  1. Fixes search by short trace id in query: {trace_id!="abc"}.
  2. (?) Fixes search by span id in query {span:id != "0123456789abcdef"}.
  3. Fixes regression bug for search by link:spanID. The bug was hidden because with bytes.TrimLeft(id, "\x00") results after HexStringToTraceID and HexStringToSpanID were the same

The ids are stored with leading zeros, no need to trim

Which issue(s) this PR fixes:
Fixes #4437 and #4967

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-64bit-trace-id branch from 0cab03a to 0cebcd1 Compare June 27, 2025 14:25
@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-64bit-trace-id branch from 0cebcd1 to 0a419f3 Compare June 27, 2025 14:34
})

t.Run(fmt.Sprintf("%s: include span id", v.Version()), func(t *testing.T) {
spanID := "0000000000010203"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to support search with trimmed leading zeros, e.g. {span:id = "10203"} ?

@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-64bit-trace-id branch from 0a419f3 to a4a7a1a Compare June 27, 2025 15:12
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 this pull request may close these issues.

Traces with 64 bit IDs cannot be queried by trace:id
1 participant
0