Skip to content
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

TraceId timestamp supports string starts with '0' #641

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

mxiamxia
Copy link
Contributor

Issue #, if available:
If upstream is sending X-Ray like trace id but with timestamp section starts with 0, such as "1-0074e2eb-694001932729d04067bb5440"
Actual,
The bug is: the trace id is parsed to "1-74e2eb-694001932729d04067bb5440".
Expected
The expected behavior is: the trace id is parsed to "1-0074e2eb-694001932729d04067bb5440".

Description of changes:
If the timestamp section in X-Ray like trace id less than 8 digits, pad 0s as prefix.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description of changes:
Unit Test

@mxiamxia mxiamxia requested a review from a team as a code owner April 18, 2024 21:38
Copy link

@vastin vastin left a comment

Choose a reason for hiding this comment

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

LGTM. ty.

@jj22ee jj22ee changed the title TraceId supports string starts with '0' TraceId timestamp supports string starts with '0' Apr 18, 2024
@mxiamxia mxiamxia merged commit e34831e into aws:master Apr 18, 2024
13 checks passed
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.

3 participants