MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestTraceAndSpanIDLengths

Function TestTraceAndSpanIDLengths

internal/traceutil/ids_test.go:5–15  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestTraceAndSpanIDLengths(t *testing.T) {
6 traceID := NewTraceID()
7 spanID := NewSpanID()
8
9 if len(traceID) != 32 {
10 t.Fatalf("expected trace id length 32, got %d", len(traceID))
11 }
12 if len(spanID) != 16 {
13 t.Fatalf("expected span id length 16, got %d", len(spanID))
14 }
15}
16
17func TestTraceIDIsUsuallyUnique(t *testing.T) {
18 a := NewTraceID()

Callers

nothing calls this directly

Calls 2

NewTraceIDFunction · 0.85
NewSpanIDFunction · 0.85

Tested by

no test coverage detected