We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I've been trying to parse a single b3 header and found that it has been parsed incorrectly. Please take a look at the following test:
b3
func TestParseSingleHeader(t *testing.T) { //https://github.com/openzipkin/b3-propagation#single-header m := make(b3.Map) //b3={TraceId}-{SpanId}-{SamplingState}-{ParentSpanId} m[b3.Context] = "80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-1-05e3ac9a4f6e3b90" spanContext, _ := m.Extract() assertEqual(t, spanContext.TraceID.String(), "80f198ee56343ba864fe8b2a57d3eff7", "traceId") assertEqual(t, spanContext.ID.String(), "e457b5a2e4d86bd1", "spanId") assertEqual(t, spanContext.ParentID.String(), "05e3ac9a4f6e3b90", "parentSpanId") } func assertEqual(t *testing.T, actual interface{}, expected interface{}, message string) { if actual == expected { return } t.Fatal(fmt.Sprintf("%s %v != %v", message, actual, expected)) }
=== RUN TestParseSingleHeader main_test.go:24: traceId 80f198ee56343ba804fe8b2a57d3eff7 != 80f198ee56343ba864fe8b2a57d3eff7 --- FAIL: TestParseSingleHeader (0.00s)
The possible issue is here:
zipkin-go/propagation/b3/spancontext.go
Line 123 in 0b3ebdb
It should be low, err := strconv.ParseUint(contextHeader[pos:pos+16], 16, 64)
low, err := strconv.ParseUint(contextHeader[pos:pos+16], 16, 64)
Thanks in advance
The text was updated successfully, but these errors were encountered:
Fix incorrect parsing of a single b3 header (#190)
79b3ad8
gh-189
No branches or pull requests
Hi, I've been trying to parse a single
b3
header and found that it has been parsed incorrectly. Please take a look at the following test:The possible issue is here:
zipkin-go/propagation/b3/spancontext.go
Line 123 in 0b3ebdb
It should be
low, err := strconv.ParseUint(contextHeader[pos:pos+16], 16, 64)
Thanks in advance
The text was updated successfully, but these errors were encountered: