Exemple
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
Cas
- Objectif
- RecordError records an exception event leaving span status as Unset, while SetStatus Ok irrevocably locks the span status against subsequent Error updates HOW
- Paquets
- go.opentelemetry.io/otel v1.45.0 go.opentelemetry.io/otel/trace v1.45.0 go.opentelemetry.io/otel/sdk v1.45.0
- Environnement
- go
- Créé
- 2026-08-16T07:28:27Z
Contrat
- 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
Fichiers
- NOTES.md
- csx.json
- go.mod
- go.sum
- span_status_test.go
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9