CodeSampleX

Sample

go.opentelemetry.io/otel/sdk v1.35.0: sdktrace.WithSpanLimits enforces asymmetric eviction between attributes and events/links, truncates span string attributes by rune count rather than byte length, and skips length truncation on event/link attributes

Verified sample for golang go.opentelemetry.io/otel/sdk v1.35.0: sdktrace.WithSpanLimits enforces asymmetric eviction between attributes and events/links…

sha256:91f72226a7c13fff2aded4e72eca39849968343e26fc8a057a36bc1b05863023

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment go linux x64 go go go

Verification-run environments

Environment Contract Stages Run
go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-17
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-18

Case

HOW
Goal
sdktrace.WithSpanLimits enforces asymmetric eviction between attributes and events/links, truncates span string attributes by rune count rather than byte length, and skips length truncation on event/link attributes
Packages
Symbols
  • sdktrace.WithSpanLimits
Environment
go
Created
2026-08-17T23:36:59Z

Contract

  1. sdktrace.WithSpanLimits applies tail-drop to span attributes while applying FIFO eviction to span events and links when count limits are exceeded.
  2. Span attribute length limits truncate string values and string slice elements by Unicode rune count instead of byte length while preserving non-string attributes.
  3. AttributeValueLengthLimit applies exclusively to span attributes and does not truncate attribute values on span events or links.
  4. Setting an attribute with an existing key updates its value in-place without triggering attribute capacity drops.
  5. AttributePerEventCountLimit and AttributePerLinkCountLimit tail-drop excess attributes on individual events and links and record DroppedAttributeCount.
  6. Non-positive count limits in SpanLimits fall back to the default of 128 while non-positive AttributeValueLengthLimit leaves string lengths unlimited.

Files

  • NOTES.md
  • csx.json
  • go.mod
  • go.sum
  • span_limits_test.go

Download the source artifact (tar.gz)

Source

NOTES.md
# OpenTelemetry Go SDK SpanLimits Behavior

## Investigation and Search
`search_known_solution` returned `NO_SAFE_MATCH` for `sdktrace.WithSpanLimits` on `go.opentelemetry.io/otel/sdk@1.35.0`. Related verification samples exist for other aspects of the library (such as `resource.Merge` or basic attribute dropping asymmetry in later versions), but the full semantics and scope of `sdktrace.WithSpanLimits` in release `1.35.0` are established here.

## Pinned Version
- `go.opentelemetry.io/otel/sdk v1.35.0`
- `go.opentelemetry.io/otel v1.35.0`
- `go.opentelemetry.io/otel/trace v1.35.0`

## Observed Behavior and Traps

### 1. Asymmetric Eviction Between Attributes and Events/Links
When buffer capacity limits are exceeded:
- **Span Attributes (`AttributeCountLimit`):** Employs tail-drop semantics. Initial unique keys up to the limit are retained, and subsequent newly added attributes are silently dropped, incrementing `DroppedAttributes`.
- **Events (`EventCountLimit`) & Links (`LinkCountLimit`):** Employs FIFO ring-buffer eviction. The oldest entries are evicted to accommodate new events and links, incrementing `DroppedEvents` and `DroppedLinks`.
- **Failure Mode:** Code instrumented under the assumption of uniform FIFO eviction across all span metadata silently loses recent attribute updates while retaining older stale ones without producing an error.

### 2. Attribute Length Truncation Counts Runes, Not Bytes
When `AttributeValueLengthLimit` is configured:
- String attribute values and elements in string slices attached directly to spans are truncated by Unicode rune count (characters), not raw byte count. A multi-byte UTF-8 character (e.g. 3-byte Chinese characters) counts as 1 towards the limit.
- Non-string attributes (integers, floats, booleans, integer slices) remain completely untruncated.
- **Failure Mode:** Code expecting byte-level truncation or truncation across non-string types will miscalculate emitted telemetry sizes.

### 3. Scope of Length Limits: Span Attributes Only
`SpanLimits.AttributeValueLengthLimit` applies strictly to span-level attributes. Attribute key-values attached to span events (`trace.WithAttributes`) or span links (`trace.Link.Attributes`) are NOT truncated by `AttributeValueLengthLimit`.
- **Failure Mode:** Assuming that setting `AttributeValueLengthLimit` safeguards APM backends against oversized event and link attribute payloads causes large string attributes on events/links to bypass length caps unnoticed.

### 4. In-Place Attribute Overwrites Bypass Capacity Drops
If an attribute key already exists on a span, calling `span.SetAttributes` with the same key updates the value in-place, even if the span has already reached its `AttributeCountLimit`. Only new, distinct keys are rejected and increment `DroppedAttributes`.

### 5. Non-Positive Limit Defaults
- Count limits (`AttributeCountLimit`, `EventCountLimit`, `LinkCountLimit`, `AttributePerEventCountLimit`, `AttributePerLinkCountLimit`) configured with values `<= 0` automatically fall back to the SDK default limit of `128`.
- In contrast, `AttributeValueLengthLimit <= 0` disables length limits completely (unlimited string length).
csx.json
{"case":{"believed":"A model expects span limits to apply a uniform eviction strategy across all collections, truncate string attributes by byte count, and enforce AttributeValueLengthLimit across span, event, and link attributes identically.","caseId":"case:sha256:e7cdbfba117ce508ad10285d3614202f9caaf4c3fd23d1c98d0cc8509e45afdf","contract":["sdktrace.WithSpanLimits applies tail-drop to span attributes while applying FIFO eviction to span events and links when count limits are exceeded.","Span attribute length limits truncate string values and string slice elements by Unicode rune count instead of byte length while preserving non-string attributes.","AttributeValueLengthLimit applies exclusively to span attributes and does not truncate attribute values on span events or links.","Setting an attribute with an existing key updates its value in-place without triggering attribute capacity drops.","AttributePerEventCountLimit and AttributePerLinkCountLimit tail-drop excess attributes on individual events and links and record DroppedAttributeCount.","Non-positive count limits in SpanLimits fall back to the default of 128 while non-positive AttributeValueLengthLimit leaves string lengths unlimited."],"goal":"sdktrace.WithSpanLimits enforces asymmetric eviction between attributes and events/links, truncates span string attributes by rune count rather than byte length, and skips length truncation on event/link attributes","kind":"HOW","packages":["pkg:golang/go.opentelemetry.io/otel/sdk@1.35.0"],"schemaVersion":1,"symbols":["sdktrace.WithSpanLimits"]},"contractCommand":["go","test","./..."],"environment":{"arch":"x64","ecosystem":"golang","executionContext":"go","language":"go","os":"linux","packageManager":"go","runtime":"go","schemaVersion":1},"license":"MIT-0","packages":["pkg:golang/go.opentelemetry.io/otel/sdk@1.35.0"],"schemaVersion":1,"symbols":["sdktrace.WithSpanLimits"],"verifierAdapter":"golang@1"}
go.mod
module example.com/spanlimits

go 1.22.0

require (
	go.opentelemetry.io/otel v1.35.0
	go.opentelemetry.io/otel/sdk v1.35.0
	go.opentelemetry.io/otel/trace v1.35.0
)

require (
	github.com/go-logr/logr v1.4.2 // indirect
	github.com/go-logr/stdr v1.2.2 // indirect
	github.com/google/uuid v1.6.0 // indirect
	go.opentelemetry.io/auto/sdk v1.1.0 // indirect
	go.opentelemetry.io/otel/metric v1.35.0 // indirect
	golang.org/x/sys v0.30.0 // indirect
)
go.sum
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
span_limits_test.go
package spanlimits_test

import (
	"context"
	"testing"

	"go.opentelemetry.io/otel/attribute"
	sdktrace "go.opentelemetry.io/otel/sdk/trace"
	"go.opentelemetry.io/otel/sdk/trace/tracetest"
	"go.opentelemetry.io/otel/trace"
)

func TestSpanLimitsAsymmetricEviction(t *testing.T) {
	exp := tracetest.NewInMemoryExporter()
	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSyncer(exp),
		sdktrace.WithSpanLimits(sdktrace.SpanLimits{
			AttributeCountLimit: 2,
			EventCountLimit:     2,
			LinkCountLimit:      2,
		}),
	)
	tr := tp.Tracer("asymmetric-eviction")

	l1 := trace.Link{
		SpanContext: trace.NewSpanContext(trace.SpanContextConfig{
			TraceID: trace.TraceID{1},
			SpanID:  trace.SpanID{1},
		}),
	}
	l2 := trace.Link{
		SpanContext: trace.NewSpanContext(trace.SpanContextConfig{
			TraceID: trace.TraceID{2},
			SpanID:  trace.SpanID{2},
		}),
	}
	l3 := trace.Link{
		SpanContext: trace.NewSpanContext(trace.SpanContextConfig{
			TraceID: trace.TraceID{3},
			SpanID:  trace.SpanID{3},
		}),
	}

	_, span := tr.Start(context.Background(), "test-span",
		trace.WithLinks(l1, l2, l3),
	)

	// Add 3 span attributes: first 2 are retained, 3rd is tail-dropped
	span.SetAttributes(
		attribute.String("a1", "val1"),
		attribute.String("a2", "val2"),
		attribute.String("a3", "val3"),
	)

	// Add 3 events: oldest (e1) is evicted, newest (e2, e3) are retained
	span.AddEvent("e1")
	span.AddEvent("e2")
	span.AddEvent("e3")

	span.End()

	spans := exp.GetSpans()
	if len(spans) != 1 {
		t.Fatalf("expected 1 span, got %d", len(spans))
	}
	s := spans[0]

	// 1. Attributes: tail-drop (a1, a2 kept; a3 dropped)
	if len(s.Attributes) != 2 {
		t.Fatalf("expected 2 attributes, got %d", len(s.Attributes))
	}
	if s.DroppedAttributes != 1 {
		t.Errorf("expected DroppedAttributes 1, got %d", s.DroppedAttributes)
	}
	if s.Attributes[0].Key != "a1" || s.Attributes[1].Key != "a2" {
		t.Errorf("expected attributes [a1, a2], got [%s, %s]", s.Attributes[0].Key, s.Attributes[1].Key)
	}

	// 2. Events: FIFO ring-buffer (e1 evicted; e2, e3 kept)
	if len(s.Events) != 2 {
		t.Fatalf("expected 2 events, got %d", len(s.Events))
	}
	if s.DroppedEvents != 1 {
		t.Errorf("expected DroppedEvents 1, got %d", s.DroppedEvents)
	}
	if s.Events[0].Name != "e2" || s.Events[1].Name != "e3" {
		t.Errorf("expected events [e2, e3], got [%s, %s]", s.Events[0].Name, s.Events[1].Name)
	}

	// 3. Links: FIFO ring-buffer (l1 evicted; l2, l3 kept)
	if len(s.Links) != 2 {
		t.Fatalf("expected 2 links, got %d", len(s.Links))
	}
	if s.DroppedLinks != 1 {
		t.Errorf("expected DroppedLinks 1, got %d", s.DroppedLinks)
	}
	if s.Links[0].SpanContext.TraceID() != l2.SpanContext.TraceID() ||
		s.Links[1].SpanContext.TraceID() != l3.SpanContext.TraceID() {
		t.Errorf("expected links [l2, l3] preserved, got trace IDs [%s, %s]",
			s.Links[0].SpanContext.TraceID(), s.Links[1].SpanContext.TraceID())
	}
}

func TestSpanLimitsAttributeLengthLimit(t *testing.T) {
	exp := tracetest.NewInMemoryExporter()
	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSyncer(exp),
		sdktrace.WithSpanLimits(sdktrace.SpanLimits{
			AttributeValueLengthLimit: 4,
		}),
	)
	tr := tp.Tracer("length-limit")

	l := trace.Link{
		SpanContext: trace.NewSpanContext(trace.SpanContextConfig{
			TraceID: trace.TraceID{1},
			SpanID:  trace.SpanID{1},
		}),
		Attributes: []attribute.KeyValue{
			attribute.String("link_str", "untruncated_link_attribute"),
		},
	}

	_, span := tr.Start(context.Background(), "test-span",
		trace.WithLinks(l),
		trace.WithAttributes(
			attribute.String("ascii_str", "abcdefgh"),
			attribute.String("utf8_str", "你好世界呀"),
			attribute.StringSlice("slice_str", []string{"alpha_long", "beta_long"}),
			attribute.Int("num", 123456789),
		),
	)

	span.AddEvent("ev", trace.WithAttributes(
		attribute.String("event_str", "untruncated_event_attribute"),
	))

	span.End()

	spans := exp.GetSpans()
	if len(spans) != 1 {
		t.Fatalf("expected 1 span, got %d", len(spans))
	}
	s := spans[0]

	attrMap := make(map[attribute.Key]attribute.Value)
	for _, kv := range s.Attributes {
		attrMap[kv.Key] = kv.Value
	}

	// ASCII string truncated to 4 characters
	if got := attrMap["ascii_str"].AsString(); got != "abcd" {
		t.Errorf("expected ascii_str 'abcd', got %q", got)
	}

	// UTF-8 multi-byte string truncated to 4 runes (not 4 bytes)
	if got := attrMap["utf8_str"].AsString(); got != "你好世界" {
		t.Errorf("expected utf8_str '你好世界', got %q", got)
	}

	// String slice elements each truncated to 4 runes
	sliceVal := attrMap["slice_str"].AsStringSlice()
	if len(sliceVal) != 2 || sliceVal[0] != "alph" || sliceVal[1] != "beta" {
		t.Errorf("expected slice_str [alph beta], got %v", sliceVal)
	}

	// Non-string attributes remain untouched
	if got := attrMap["num"].AsInt64(); got != 123456789 {
		t.Errorf("expected num 123456789, got %d", got)
	}

	// Event attributes are NOT truncated by AttributeValueLengthLimit
	if got := s.Events[0].Attributes[0].Value.AsString(); got != "untruncated_event_attribute" {
		t.Errorf("expected event_str untruncated, got %q", got)
	}

	// Link attributes are NOT truncated by AttributeValueLengthLimit
	if got := s.Links[0].Attributes[0].Value.AsString(); got != "untruncated_link_attribute" {
		t.Errorf("expected link_str untruncated, got %q", got)
	}
}

func TestSpanLimitsInPlaceAttributeUpdate(t *testing.T) {
	exp := tracetest.NewInMemoryExporter()
	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSyncer(exp),
		sdktrace.WithSpanLimits(sdktrace.SpanLimits{
			AttributeCountLimit: 1,
		}),
	)
	tr := tp.Tracer("inplace-update")

	_, span := tr.Start(context.Background(), "test-span",
		trace.WithAttributes(attribute.String("k1", "initial")),
	)

	// Updating existing key "k1" succeeds in place even at capacity
	span.SetAttributes(attribute.String("k1", "updated"))

	// Adding a new key "k2" is tail-dropped because capacity is reached
	span.SetAttributes(attribute.String("k2", "dropped"))

	span.End()

	spans := exp.GetSpans()
	if len(spans) != 1 {
		t.Fatalf("expected 1 span, got %d", len(spans))
	}
	s := spans[0]

	if len(s.Attributes) != 1 {
		t.Fatalf("expected 1 attribute, got %d", len(s.Attributes))
	}
	if s.Attributes[0].Key != "k1" || s.Attributes[0].Value.AsString() != "updated" {
		t.Errorf("expected k1 = 'updated', got %s = %q", s.Attributes[0].Key, s.Attributes[0].Value.AsString())
	}
	if s.DroppedAttributes != 1 {
		t.Errorf("expected DroppedAttributes 1, got %d", s.DroppedAttributes)
	}
}

func TestSpanLimitsPerEventAndPerLinkAttributeLimits(t *testing.T) {
	exp := tracetest.NewInMemoryExporter()
	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSyncer(exp),
		sdktrace.WithSpanLimits(sdktrace.SpanLimits{
			AttributePerEventCountLimit: 1,
			AttributePerLinkCountLimit:  1,
		}),
	)
	tr := tp.Tracer("per-entity-limits")

	l := trace.Link{
		SpanContext: trace.NewSpanContext(trace.SpanContextConfig{
			TraceID: trace.TraceID{1},
			SpanID:  trace.SpanID{1},
		}),
		Attributes: []attribute.KeyValue{
			attribute.String("lk1", "lv1"),
			attribute.String("lk2", "lv2"),
		},
	}

	_, span := tr.Start(context.Background(), "test-span",
		trace.WithLinks(l),
	)

	span.AddEvent("ev", trace.WithAttributes(
		attribute.String("ek1", "ev1"),
		attribute.String("ek2", "ev2"),
	))

	span.End()

	spans := exp.GetSpans()
	if len(spans) != 1 {
		t.Fatalf("expected 1 span, got %d", len(spans))
	}
	s := spans[0]

	// Event attributes: tail-dropped to limit 1
	if len(s.Events[0].Attributes) != 1 || s.Events[0].Attributes[0].Key != "ek1" {
		t.Errorf("expected 1 event attribute [ek1], got %v", s.Events[0].Attributes)
	}
	if s.Events[0].DroppedAttributeCount != 1 {
		t.Errorf("expected event DroppedAttributeCount 1, got %d", s.Events[0].DroppedAttributeCount)
	}

	// Link attributes: tail-dropped to limit 1
	if len(s.Links[0].Attributes) != 1 || s.Links[0].Attributes[0].Key != "lk1" {
		t.Errorf("expected 1 link attribute [lk1], got %v", s.Links[0].Attributes)
	}
	if s.Links[0].DroppedAttributeCount != 1 {
		t.Errorf("expected link DroppedAttributeCount 1, got %d", s.Links[0].DroppedAttributeCount)
	}
}

func TestSpanLimitsNonPositiveDefaults(t *testing.T) {
	exp := tracetest.NewInMemoryExporter()
	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSyncer(exp),
		sdktrace.WithSpanLimits(sdktrace.SpanLimits{
			AttributeCountLimit:       0,
			AttributeValueLengthLimit: -1,
		}),
	)
	tr := tp.Tracer("nonpositive-limits")

	_, span := tr.Start(context.Background(), "test-span")

	// AttributeCountLimit <= 0 defaults to 128
	for i := 0; i < 130; i++ {
		span.SetAttributes(attribute.Int(string(rune('A'+(i%26)))+string(rune('0'+(i/26))), i))
	}

	// AttributeValueLengthLimit <= 0 means unlimited string length
	const longVal = "this-is-a-long-string-that-should-not-be-truncated-because-limit-is-nonpositive"
	span.SetAttributes(attribute.String("long_key", longVal))

	span.End()

	spans := exp.GetSpans()
	if len(spans) != 1 {
		t.Fatalf("expected 1 span, got %d", len(spans))
	}
	s := spans[0]

	// 128 unique keys retained, 3 dropped (130 generated + 1 long_key = 131 unique keys)
	if len(s.Attributes) != 128 {
		t.Fatalf("expected default 128 attributes, got %d", len(s.Attributes))
	}
	if s.DroppedAttributes != 3 {
		t.Errorf("expected 3 dropped attributes, got %d", s.DroppedAttributes)
	}

	// Verify long string value was not truncated
	for _, kv := range s.Attributes {
		if kv.Key == "long_key" {
			if kv.Value.AsString() != longVal {
				t.Errorf("expected full string value, got %q", kv.Value.AsString())
			}
			break
		}
	}
}

Origin Seeder

csx-seed