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

Release v1.15.0/v0.38.0 breaks otelsql #101

Closed
reenjii opened this issue May 2, 2023 · 1 comment · Fixed by #102
Closed

Release v1.15.0/v0.38.0 breaks otelsql #101

reenjii opened this issue May 2, 2023 · 1 comment · Fixed by #102

Comments

@reenjii
Copy link
Contributor

reenjii commented May 2, 2023

Latest opentelemetry-go release v1.15.0/v0.38.0 breaks otelsql.
open-telemetry/opentelemetry-go#4035

github.com/uptrace/opentelemetry-go-extra/otelsql/otel.go:109:70: cannot use t.attrs (variable of type []"go.opentelemetry.io/otel/attribute".KeyValue) as type []metric.RecordOption in argument to t.queryHistogram.Record github.com/uptrace/opentelemetry-go-extra/otelsql/otel.go:228:66: cannot use labels (variable of type []"go.opentelemetry.io/otel/attribute".KeyValue) as type []metric.ObserveOption in argument to o.ObserveInt64

A breaking change has been introduced in: open-telemetry/opentelemetry-go#3971

The measurement methods for all instruments in go.opentelemetry.io/otel/metric/instrument accept an option instead of the variadic "go.opentelemetry.io/otel/attribute".KeyValue

We need to use new metric.WithAttributes helper to build an ObserveOption list from a KeyValue list.

@vmihailenco
Copy link
Member

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants