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

chore: bump otelsql to use opentelemetry-go v1.15.1/v0.38.1 #102

Merged
merged 2 commits into from
May 4, 2023

Conversation

reenjii
Copy link
Contributor

@reenjii reenjii commented May 2, 2023

Fix #101

The latest opentelemetry-go release v1.15.0/v0.38.0 introduces a breaking change that breaks otelsql. We need to use new metric.WithAttributes helper to build an ObserveOption list from a KeyValue list.

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

Latest opentelemetry-go release: open-telemetry/opentelemetry-go#4035
Breaking change: open-telemetry/opentelemetry-go#3971

@batazor
Copy link

batazor commented May 2, 2023

@reenjii Hi! It looks like we need to update the dependencies

go: updates to go.mod needed; to update it:
go mod tidy

@reenjii
Copy link
Contributor Author

reenjii commented May 3, 2023

Hello @batazor !

Thanks, indeed I run a go mod tidy in all packages but it seems not enough. I have trouble with the examples folders.

For example when running go mod tidy from uptrace/opentelemetry-go-extra/otelgorm/example

go: finding module for package go.opentelemetry.io/otel/metric/unit
github.com/uptrace/opentelemetry-go-extra/otelgorm/example imports
        github.com/uptrace/opentelemetry-go-extra/otelplay imports
        github.com/uptrace/uptrace-go/uptrace imports
        go.opentelemetry.io/contrib/instrumentation/runtime imports
        go.opentelemetry.io/otel/metric/unit: module go.opentelemetry.io/otel/metric@latest found (v0.38.0), but does not contain package go.opentelemetry.io/otel/metric/unit

I'll try to solve this when I have some time but if you have an idea let me know :)

The latest opentelemetry-go release v1.15.0/v0.38.0 introduces a breaking change.

> 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

It breaks otelsql: we need to use new metric.WithAttributes helper
to build an ObserveOption list from a KeyValue list.

Latest opentelemetry-go release: open-telemetry/opentelemetry-go#4035
Breaking change: open-telemetry/opentelemetry-go#3971
@reenjii reenjii changed the title chore: bump otelsql to use opentelemetry-go v1.15.0/v0.38.0 chore: bump otelsql to use opentelemetry-go v1.15.1/v0.38.1 May 3, 2023
@reenjii
Copy link
Contributor Author

reenjii commented May 3, 2023

Hey @batazor !

I managed to update properly all modules and got it working.

But opentelemetry-go no longer supports go 1.18 (relies on 1.19 feature https://pkg.go.dev/sync/atomic#Pointer ) so I guess you should remove the 1.18.x build check 👍

Let me know if this looks good to you!

@batazor
Copy link

batazor commented May 3, 2023

@reenjii Thanks, this is the last library that is preventing me from completing the migration to the new version of the libraries, I hope this PR will be accepted soon

@vmihailenco Apparently, the minimum version of Go must be up.

@vmihailenco vmihailenco merged commit e200bca into uptrace:main May 4, 2023
2 of 3 checks passed
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 this pull request may close these issues.

Release v1.15.0/v0.38.0 breaks otelsql
3 participants