Skip to content

Conversation

ruslan-mikhailov
Copy link
Contributor

@ruslan-mikhailov ruslan-mikhailov commented Jul 1, 2025

What this PR does:
Fixes search by span id without leading zeros
Contains #5331. Diff is in the last 3 commits

Which issue(s) this PR fixes:
Fixes #

Checklist

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

operand := o.RHS.(Static)
if o.LHS.(Attribute).Intrinsic == IntrinsicSpanID {
operand = normalizeSpanIDOperand(operand)
o.RHS = operand // Update the operation with the normalized operand
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure whether it's the right way to do to change LHS/RHS inside extractConditions

@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-span-id-no-leading-zeros branch from 0b7fe7d to ea4ecae Compare July 1, 2025 10:09
@ruslan-mikhailov ruslan-mikhailov changed the title [Bugfix] query span id no leading zeros Proposal: query span id no leading zeros Jul 1, 2025
@ruslan-mikhailov ruslan-mikhailov changed the title Proposal: query span id no leading zeros Proposal: query span id with no leading zeros Jul 1, 2025
@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-span-id-no-leading-zeros branch from ea4ecae to 6a71b19 Compare July 11, 2025 14:24
@ruslan-mikhailov ruslan-mikhailov marked this pull request as ready for review July 11, 2025 14:38
@ruslan-mikhailov ruslan-mikhailov marked this pull request as draft July 15, 2025 08:13
@ruslan-mikhailov ruslan-mikhailov force-pushed the bugfix/query-span-id-no-leading-zeros branch from 6a71b19 to b8e4031 Compare July 29, 2025 08:18
{
Op: "Equal",
CompareCond: `bytes.Equal(bytes.TrimLeft(vv, "\x00"), p.value)`,
RangeCond: "",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really like that we have to skip RangeCond. Maybe it would be better to add/remove leading zeroes on write as we do for trace id?

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.

1 participant