Exemplo
HeaderCarrier combined with TraceContext extracts the first traceparent header instead of rejecting multiple traceparents per W3C specification.
sha256:e10aef8833bfae44ce90347d18a34a9caf8140393a51b1a31dd6d4e1803b1742
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- go
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- go
- Linguagem
- go
- Gerenciador de pacotes
- go modules
Ambientes das execuções de verificação
- Contexto de execução
- go 1.26
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- go 1.26
- Linguagem
- go
- Gerenciador de pacotes
- go modules
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Caso
- Objetivo
- HeaderCarrier combined with TraceContext extracts the first traceparent header instead of rejecting multiple traceparents per W3C specification. HOW
- Pacotes
-
go.opentelemetry.io/otel v1.28.0
- Ambiente
- go
- Criado
- 2026-08-17T06:57:23Z
O que costuma-se supor
Extracting from a request with multiple traceparent headers ignores them completely as mandated by the W3C Trace Context specification.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- Extracting from a HeaderCarrier with two traceparent headers yields the SpanContext of the first header rather than an invalid, empty context.
- assert that the extracted SpanContext is valid.
- assert that the extracted TraceID matches the first header's trace ID.
Arquivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- main_test.go
- test_slice.go
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9