Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest version of log bridge is not compiling #6239

Closed
Ignaciojeria opened this issue Oct 13, 2024 · 7 comments · Fixed by #6243
Closed

latest version of log bridge is not compiling #6239

Ignaciojeria opened this issue Oct 13, 2024 · 7 comments · Fixed by #6243
Labels
bug Something isn't working

Comments

@Ignaciojeria
Copy link

Ignaciojeria commented Oct 13, 2024

Description

When I run my app using the latest versions of OpenTelemetry contributions, it throws the following error:
......\go\pkg\mod\go.opentelemetry.io\contrib\bridges\[email protected]\handler.go:207:31: cannot use record (variable of type "go.opentelemetry.io/otel/log".Record) as "go.opentelemetry.io/otel/log".EnabledParameters value in argument to h.logger.Enabled
image

Environment

My go mod :
module multi-folder-components

go 1.22.0

require (
github.com/Ignaciojeria/einar-ioc/v2 v2.4.0
github.com/go-playground/validator/v10 v10.22.1
github.com/go-slog/otelslog v0.1.0
github.com/hellofresh/health-go/v5 v5.5.3
github.com/joho/godotenv v1.5.1
github.com/labstack/echo/v4 v4.12.0
go.opentelemetry.io/contrib/bridges/otelslog v0.5.0
go.opentelemetry.io/otel v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.7.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0
go.opentelemetry.io/otel/metric v1.31.0
go.opentelemetry.io/otel/sdk v1.31.0
go.opentelemetry.io/otel/sdk/log v0.7.0
go.opentelemetry.io/otel/sdk/metric v1.31.0
go.opentelemetry.io/otel/trace v1.31.0
google.golang.org/grpc v1.67.1
)

require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
github.com/heimdalr/dag v1.5.0 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opentelemetry.io/otel/log v0.7.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/protobuf v1.35.1 // indirect
)

Steps To Reproduce

$ go install github.com/Ignaciojeria/[email protected]
$ einar install observability
$ go run main.go

EinarCLI:
https://ignaciojeria.github.io/
After this issue, I learned that it is critical to create a mechanism to test and validate versions before upgrading them. I’m going to add that to my backlog.

@Ignaciojeria Ignaciojeria added the bug Something isn't working label Oct 13, 2024
@duongphuhiep
Copy link

hmm the problem maybe deeper than that? why didn't the CI/CD fail when the project doesn't compile?
image

or maybe why not write some unit tests for this handler.go evens if a silly one?

@elkcert
Copy link

elkcert commented Oct 14, 2024

Same issue. Think it has something to do with this open-telemetry/opentelemetry-go#5791

@MrAlias
Copy link
Contributor

MrAlias commented Oct 14, 2024

Thank you for your interest in the project. The release for the slog bridge has been delayed. It should be out in a day or so and resolve this.

@elkcert
Copy link

elkcert commented Oct 14, 2024

Thank you for your interest in the project. The release for the slog bridge has been delayed. It should be out in a day or so and resolve this.

The issue is present when using the zap bridge as well:

[...]\go\pkg\mod\go.opentelemetry.io\contrib\bridges\[email protected]\core.go:145:48: cannot use r (variable of type "go.opentelemetry.io/otel/log".Record) as "go.opentelemetry.io/otel/log".EnabledParameters value in argument to o.logger.Enabled

[...]\go\pkg\mod\go.opentelemetry.io\contrib\bridges\[email protected]\core.go:187:42: cannot use r (variable of type "go.opentelemetry.io/otel/log".Record) as "go.opentelemetry.io/otel/log".EnabledParameters value in argument to logger.Enabled

@dmathieu
Copy link
Member

All packages in this repository are released at the same time. This will be resolved by #6243.

@MrAlias
Copy link
Contributor

MrAlias commented Oct 14, 2024

@Ignaciojeria this should be resolved by upgrading to the latest version of the bridges. Please verify and re-open if you are still having issues. Sorry about the disruption.

@Ignaciojeria
Copy link
Author

I was at work and didn't have time to validate it since I usually make progress on EinarCLI in my free time. I just tested it, and it worked perfectly. Thank you so much! I'll improve the dependency versioning on my end and test the updates suggested by Dependabot before making a new release. Thanks again for your contribution to the community with your work. 🚀

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants