You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
TraceID and SpanID implementations for Stringer Interface (#642)
* TraceID and SpanID implementations for Stringer Interface * Hex encode while stringifying * Modify format specifiers wherever SpanID is used * comment changes * Remove TraceIdString() and SpanIdString() * Comments Fixes
This commit is contained in:
@@ -139,7 +139,7 @@ func BenchmarkTraceID_DotString(b *testing.B) {
|
||||
|
||||
want := "0000000000000001000000000000002a"
|
||||
for i := 0; i < b.N; i++ {
|
||||
if got := sc.TraceIDString(); got != want {
|
||||
if got := sc.TraceID.String(); got != want {
|
||||
b.Fatalf("got = %q want = %q", got, want)
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func BenchmarkSpanID_DotString(b *testing.B) {
|
||||
sc := core.SpanContext{SpanID: core.SpanID{1}}
|
||||
want := "0100000000000000"
|
||||
for i := 0; i < b.N; i++ {
|
||||
if got := sc.SpanIDString(); got != want {
|
||||
if got := sc.SpanID.String(); got != want {
|
||||
b.Fatalf("got = %q want = %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user