Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.50.0 breaks build #32269
Closed
Description
Component(s)
examples/demo
What happened?
There seems to be breaking changes in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0. That breaks example demo client
Error: client/main.go:28:11: could not import go.opentelemetry.io/otel/sdk/trace (-: # go.opentelemetry.io/otel/sdk/trace
Error: /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.24.0/trace/span.go:165:20: cannot use (*recordingSpan)(nil) (value of type *recordingSpan) as ReadWriteSpan value in variable declaration: *recordingSpan does not implement ReadWriteSpan (missing method AddLink)
Error: /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.24.0/trace/span.go:804:20: cannot use nonRecordingSpan{} (value of type nonRecordingSpan) as "go.opentelemetry.io/otel/trace".Span value in variable declaration: nonRecordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
Error: /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.24.0/trace/tracer.go:50:21: impossible type assertion: p.(*recordingSpan)
*recordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
Error: /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.24.0/trace/tracer.go:[120](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/8618496348/job/23621321404?pr=32255#step:8:121):10: cannot use tr.newNonRecordingSpan(sc) (value of type nonRecordingSpan) as "go.opentelemetry.io/otel/trace".Span value in return statement: nonRecordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
Error: /home/runner/go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.24.0/trace/tracer.go:122:9: cannot use tr.newRecordingSpan(psc, sc, name, samplingResult, config) (value of type *recordingSpan) as "go.opentelemetry.io/otel/trace".Span value in return statement: *recordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)) (typecheck)
sdktrace "go.opentelemetry.io/otel/sdk/trace"
Collector version
mainline
Environment information
No response
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response