示例
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