Sample
resource.Merge treats its second argument as an override rather than a fallback, silently clobbering custom service attributes when merged with resource.Default(), and errors on conflicting non-empty schema URLs
sha256:14dd434489e1359c9763ff1d4b367d176e5e60de805649a7f09831dc5b572bc2
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- resource.Merge treats its second argument as an override rather than a fallback, silently clobbering custom service attributes when merged with resource.Default(), and errors on conflicting non-empty schema URLs HOW
- Packages
- go.opentelemetry.io/otel v1.45.0 go.opentelemetry.io/otel/sdk v1.45.0
- Environment
- go
- Created
- 2026-08-16T07:28:24Z
Contract
- assert custom resource alone does not contain default telemetry SDK attributes
- assert default resource service name defaults to unknown_service prefix
- assert resource.Merge(custom, default) inverts precedence and clobbers custom service.name with unknown_service
- assert resource.Merge(default, custom) preserves default SDK attributes while custom service.name takes precedence
- assert resource.Merge with conflicting non-empty schema URLs returns ErrSchemaURLConflict
Files
- NOTES.md
- csx.json
- go.mod
- go.sum
- resource_test.go
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9