genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[Go] Genkit SDK v0.5.1 will not build against dependant otel SDK v1.35.0

Open ZanzyTHEbar opened this issue 1 year ago • 8 comments

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:

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.

ZanzyTHEbar avatar Apr 16 '25 15:04 ZanzyTHEbar

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.

genesem avatar Apr 23 '25 15:04 genesem

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.

I downgraded otel sdk to the last version v1.34.0.

ZanzyTHEbar avatar Apr 23 '25 16:04 ZanzyTHEbar

Hi folks, thanks for pointing this out, we are currently working on this issue. I'll get this fixed asap 👍🏽

hugoaguirre avatar Apr 23 '25 17:04 hugoaguirre

@ZanzyTHEbar I can't get it to compile even after downgrading otel sdk to v1.34.0. Anything else you did?

timothytavarez avatar Apr 24 '25 09:04 timothytavarez

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..

genesem avatar Apr 24 '25 13:04 genesem

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]"

genesem avatar Apr 24 '25 13:04 genesem

Thank you @genesem, apologies everyone.

ZanzyTHEbar avatar Apr 24 '25 19:04 ZanzyTHEbar

Hey @ZanzyTHEbar, the issue got solved in #2825 and will be available in the next release.

I'll close this issue

hugoaguirre avatar Apr 29 '25 23:04 hugoaguirre