Fix panic in SpanDeduper when traceID is empty slice#3668
Fix panic in SpanDeduper when traceID is empty slice#3668mdisibio merged 2 commits intografana:mainfrom
Conversation
|
This PR must be merged before a backport PR will be created. |
|
Hello @mdisibio!
Please, if the current pull request addresses a bug fix, label it with the |
* Fix panic in SpanDeduper when traceID is empty slice * changelog (cherry picked from commit d8c69d4)
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3668-to-r147 origin/r147
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x d8c69d487eaa1f64af291793ef3b667c133342f0When the conflicts are resolved, stage and commit the changes: If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-3668-to-r147
# Create the PR body template
PR_BODY=$(gh pr view 3668 --json body --template 'Backport d8c69d487eaa1f64af291793ef3b667c133342f0 from #3668{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[r147] Fix panic in SpanDeduper when traceID is empty slice" --body-file - --label "type/bug" --label "backport" --base r147 --milestone r147 --webOr, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-3668-to-r147
# Create a pull request where the `base` branch is `r147` and the `compare`/`head` branch is `backport-3668-to-r147`.
# Remove the local backport branch
git switch main
git branch -D backport-3668-to-r147 |
* Fix panic in SpanDeduper when traceID is empty slice * changelog (cherry picked from commit d8c69d4)
What this PR does:
SpanDeduper uses the last byte of the trace ID to shard into a submap of seen values. It didn't protect against an empty trace ID, which led to a panic.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]