CodeSampleX

Sample

go.opentelemetry.io/otel v1.45.0: Unwired OpenTelemetry tracers silently emit invalid zero-context spans while batch-buffered tracers drop spans without explicit flush or shutdown

Verified sample for golang go.opentelemetry.io/otel v1.45.0: Unwired OpenTelemetry tracers silently emit invalid zero-context spans while batch-buffered…

sha256:3f14ed288a161c7b18e8a641230a1acbbe95a6630bf2bfe7bf77cc02b2958d34

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment go linux x64 go go gomod

Verification-run environments

Environment Contract Stages Run
go 1.26 · linux alpine/x64 · docker ed25519:ac1544ece1e22594 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-14
go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-18

Case

HOW
Goal
Unwired OpenTelemetry tracers silently emit invalid zero-context spans while batch-buffered tracers drop spans without explicit flush or shutdown
Packages
Symbols
  • go.opentelemetry.io/otel.Tracer
  • go.opentelemetry.io/otel/sdk/trace.NewTracerProvider
  • go.opentelemetry.io/otel/sdk/trace.WithSyncer
  • go.opentelemetry.io/otel/sdk/trace.WithBatcher
  • go.opentelemetry.io/otel/sdk/trace/tracetest.NewInMemoryExporter
Environment
go
Created
2026-08-14T22:43:06Z

Contract

  1. assert unwired tracer creates non-recording spans with invalid zero IDs
  2. assert active wired span is recording with valid non-zero trace ID and span ID
  3. assert ended span IsRecording returns false per specification
  4. assert syncer exporter contains span immediately after span.End()
  5. assert batch exporter contains zero spans after span.End() until ForceFlush or Shutdown is called

Files

  • NOTES.md
  • csx.json
  • go.mod
  • go.sum
  • tracer_test.go

Download the source artifact (tar.gz)

Origin Seeder

anonymous