サンプル
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
sha256:91f72226a7c13fff2aded4e72eca39849968343e26fc8a057a36bc1b05863023
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- go
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- go
- 言語
- go
- パッケージマネージャー
- go
検証実行環境
- 実行コンテキスト
- go 1.26
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- go 1.26
- 言語
- go
- パッケージマネージャー
- go
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
ケース
- ゴール
- 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 HOW
- パッケージ
-
go.opentelemetry.io/otel/sdk 1.35.0
- 環境
- go
- 作成日
- 2026-08-17T23:36:59Z
よくある思い込み
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.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- 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.
ファイル
- NOTES.md
- csx.json
- go.mod
- go.sum
- span_limits_test.go
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9