Exemplo
resource.Merge returns both a populated Resource with an empty SchemaURL and an ErrSchemaURLConflict error when merging resources with conflicting Schema URLs
sha256:c7c937b54a78b5b101b55edeb18f6e228637c69beb567d5a944ca2031f9ac7f6
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
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
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Caso
- Objetivo
- resource.Merge returns both a populated Resource with an empty SchemaURL and an ErrSchemaURLConflict error when merging resources with conflicting Schema URLs HOW
- Pacotes
-
go.opentelemetry.io/otel/sdk v1.45.0
- Ambiente
- go
- Criado
- 2026-08-17T06:58:56Z
O que costuma-se supor
resource.Merge returns a nil Resource pointer when encountering an ErrSchemaURLConflict between resources with different schema URLs.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- resource.Merge with conflicting non-empty schema URLs returns a non-nil Resource with SchemaURL set to empty string alongside ErrSchemaURLConflict while merging attributes
- resource.Merge overwrites attributes from the first resource with attributes from the second resource on key collision even when a schema URL conflict occurs
- resource.Merge with one schemaless resource and one schema-defined resource succeeds without error and adopts the non-empty schema URL
Arquivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- resource_test.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