Skip to content

span id to hex#2062

Merged
joe-elliott merged 7 commits intografana:mainfrom
ie-pham:jpham/2060
Feb 22, 2023
Merged

span id to hex#2062
joe-elliott merged 7 commits intografana:mainfrom
ie-pham:jpham/2060

Conversation

@ie-pham
Copy link
Copy Markdown
Contributor

@ie-pham ie-pham commented Feb 3, 2023

What this PR does: stop removing leading zeroes in span ids

Which issue(s) this PR fixes:
Fixes #2060

Checklist

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

Comment thread pkg/util/traceid_test.go
Comment thread pkg/util/traceid.go Outdated
Comment thread pkg/util/traceid.go Outdated
@ie-pham ie-pham requested a review from joe-elliott February 21, 2023 17:48
Comment thread pkg/util/traceid.go
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

This looks good. One last thing! Add a changelog entry then we'll merge and backport to 2.0.1

@ie-pham
Copy link
Copy Markdown
Contributor Author

ie-pham commented Feb 21, 2023

@joe-elliott One last question, extra logic would have to be added to this I believe but what happens if the span id has leading zeroes and it is longer than 16 characters? Still no trimming?

@joe-elliott
Copy link
Copy Markdown
Collaborator

@joe-elliott One last question, extra logic would have to be added to this I believe but what happens if the span id has leading zeroes and it is longer than 16 characters? Still no trimming?

since we're in "shouldn't happen" territory i'm fine with anything that:

  • doesn't panic
  • makes decent sense
  • doesn't overcomplicate the code

Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

looks good!

@joe-elliott joe-elliott added type/bug Something isn't working backport release-v2.0 labels Feb 22, 2023
@joe-elliott joe-elliott merged commit 2d50f21 into grafana:main Feb 22, 2023
@github-actions
Copy link
Copy Markdown
Contributor

The backport to release-v2.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-2062-to-release-v2.0 origin/release-v2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 2d50f21918c81a433e62b6f9b759ca7b98ed7482
# Push it to GitHub
git push --set-upstream origin backport-2062-to-release-v2.0
git switch main
# Remove the local backport branch
git branch -D backport-2062-to-release-v2.0

Then, create a pull request where the base branch is release-v2.0 and the compare/head branch is backport-2062-to-release-v2.0.

joe-elliott pushed a commit that referenced this pull request Feb 23, 2023
* span id to hex

* logic

* simplify

* fmt

* update test

* what is logic

* changelog

(cherry picked from commit 2d50f21)
joe-elliott added a commit that referenced this pull request Feb 23, 2023
* span id to hex

* logic

* simplify

* fmt

* update test

* what is logic

* changelog

(cherry picked from commit 2d50f21)

Co-authored-by: Jennie Pham <94262131+ie-pham@users.noreply.github.com>
@ie-pham ie-pham deleted the jpham/2060 branch March 17, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop trimming leading 0s on span ids

2 participants