Ejemplo
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
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- go
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- go
- Lenguaje
- go
- Gestor de paquetes
- go
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- go 1.26
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- go 1.26
- Lenguaje
- go
- Gestor de paquetes
- go
- Ejecución
- 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
- Paquetes
-
go.opentelemetry.io/otel/sdk v1.45.0
- Entorno
- go
- Creado
- 2026-08-17T06:58:56Z
Lo que suele suponerse
resource.Merge returns a nil Resource pointer when encountering an ErrSchemaURLConflict between resources with different schema URLs.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
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
Archivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- resource_test.go
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9