サンプル
RecordError records an exception event leaving span status as Unset, while SetStatus Ok irrevocably locks the span status against subsequent Error updates
sha256:1bf17bde93ae26bd833bf9e707662cf033b05798d2ab0c1289d2d691da1b1942
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- RecordError records an exception event leaving span status as Unset, while SetStatus Ok irrevocably locks the span status against subsequent Error updates HOW
- パッケージ
- go.opentelemetry.io/otel v1.45.0 go.opentelemetry.io/otel/trace v1.45.0 go.opentelemetry.io/otel/sdk v1.45.0
- 環境
- go
- 作成日
- 2026-08-16T07:28:27Z
コントラクト
- assert RecordError records exception event with type and message but leaves span status as Unset
- assert RecordError with nil error is a no-op recording zero events
- assert marking span status as Error requires explicit SetStatus call with description
- assert SetStatus Ok is terminal and cannot be overridden by subsequent SetStatus Error
- assert SetStatus Ok overrides earlier Error status and clears description
- assert SetStatus Unset cannot demote an already set Error or Ok status
ファイル
- NOTES.md
- csx.json
- go.mod
- go.sum
- span_status_test.go
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9