[Go] Genkit SDK v0.5.1 will not build against dependant otel SDK v1.35.0
Describe the bug Incompatible type for otel sdk in core>tracing>trace_server_exporer.go. This is caused by otel sdk v1.35.0+ deprecating instrumentation.Library in favour of instrumentation.Scope.
This causes builds to fail.
~/go/pkg/mod/github.com/firebase/genkit/[email protected]/core/tracing/trace_server_exporter.go:105:51: cannot convert span.InstrumentationLibrary() (value of struct type instrumentation.Library) to type InstrumentationLibrary
To Reproduce
Deps:
- genkit/[email protected]
- go.opentelemetry.io/otel/[email protected]+
Expected behavior
I expect the code to compile.
Screenshots If applicable, add screenshots to help explain your problem.
Runtime (please complete the following information):
- OS: Linux
- Version: Ubuntu 24.10
** Go version
- go version go1.24.1 linux/amd64
Additional context Add any other context about the problem here.
Same here for: win10, genkit/go v0.5.2 go.opentelemetry.io/otel/sdk v1.35.0
Error: github.com\firebase\genkit\[email protected]\core\tracing\trace_server_exporter.go:105:51: cannot convert span.InstrumentationLibrary() (value of struct type instrumentation.Library) to type InstrumentationLibrary
Even basic get-started example won't compile.
Same here for: win10, genkit/go v0.5.2 go.opentelemetry.io/otel/sdk v1.35.0
Error:
github.com\firebase\genkit\[email protected]\core\tracing\trace_server_exporter.go:105:51: cannot convert span.InstrumentationLibrary() (value of struct type instrumentation.Library) to type InstrumentationLibraryEven basic get-started example won't compile.
I downgraded otel sdk to the last version v1.34.0.
Hi folks, thanks for pointing this out, we are currently working on this issue. I'll get this fixed asap 👍🏽
@ZanzyTHEbar I can't get it to compile even after downgrading otel sdk to v1.34.0. Anything else you did?
Sorry for my previouse message, please disregard it..
I've found the way it builds :)
1: $ go get github.com/firebase/genkit/go
2: Removed everything else in go.mod under requre, indirect.
3:
$ go get "go.opentelemetry.io/[email protected]"
$ go get "go.opentelemetry.io/otel/[email protected]"
`$ go mod tidy
p.s. sorry for some spam in edits..
After some investigation the problem is only in go.opentelemetry.io/otel/sdk the version must be 1.29.0
But "go.opentelemetry.io/[email protected]" -- works.
So:
go get "go.opentelemetry.io/[email protected]"
go get "go.opentelemetry.io/otel/[email protected]"
Thank you @genesem, apologies everyone.
Hey @ZanzyTHEbar, the issue got solved in #2825 and will be available in the next release.
I'll close this issue