-
Notifications
You must be signed in to change notification settings - Fork 603
[Bugfix] Fix search by trace:id with short trace 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
[Bugfix] Fix search by trace:id with short trace ID #5331
Conversation
0cebcd1
to
0a419f3
Compare
}) | ||
|
||
t.Run(fmt.Sprintf("%s: include span id", v.Version()), func(t *testing.T) { | ||
spanID := "0000000000010203" |
There was a problem hiding this comment.
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"}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added fix in a separate PR: #5343
a4a7a1a
to
2c3a94a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2c3a94a
to
7f81273
Compare
7f81273
to
32858f9
Compare
+ rebase from latest main to resolve conflicts |
* search tests refactoring * search tests refactoring * search test refactoring: trace id input param * Tests for search by trace:id and span:id * [bugfix] Correct filtration by trace:id * make gen-parquet-query * Minor optimisation * [bugfix] fix regression bug for search by link:spanID * Search tests: find all traces case * Mute gosec linter for tests * Changelog
What this PR does:
Trace IDs are stored with leading zeros, no need to trim
{trace_id!="abc"}
.link:spanID
. The bug was hidden because withbytes.TrimLeft(id, "\x00")
results afterHexStringToTraceID
andHexStringToSpanID
were the sameWhich issue(s) this PR fixes:
Fixes #4437 and #4967
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]