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

cannot find package "go.opentelemetry.io/otel/api/trace" #1237

Closed
settys opened this issue Oct 9, 2020 · 4 comments
Closed

cannot find package "go.opentelemetry.io/otel/api/trace" #1237

settys opened this issue Oct 9, 2020 · 4 comments
Labels
invalid This doesn't seem right question Further information is requested wontfix This will not be worked on
Milestone

Comments

@settys
Copy link

settys commented Oct 9, 2020

I use go-redis, which fails,with the error,

cannot find package "go.opentelemetry.io/otel/api/trace" in any of:
/usr/local/go/src/go.opentelemetry.io/otel/api/trace (from $GOROOT)
/go/src/go.opentelemetry.io/otel/api/trace (from $GOPATH)

@Aneurysm9
Copy link
Member

Are you not using Go modules? go-redis should be using the v0.11.0 SDK according to its go.mod. Building it against HEAD is not guaranteed to work and is likely to break intermittently as we work toward 1.0, thus we cannot support it.

@Aneurysm9 Aneurysm9 added invalid This doesn't seem right question Further information is requested wontfix This will not be worked on labels Oct 9, 2020
@MrAlias
Copy link
Contributor

MrAlias commented Oct 9, 2020

This was moved into the otel package on master: #1229

It looks like go-redis uses modules: https://github.com/go-redis/redis/blob/b965d69fc9defa439a46d8178b60fc1d44f8fe29/go.mod#L10

If you make sure you are using a compatible version of Go you should also use modules and not have an issue.

@MrAlias MrAlias closed this as completed Oct 9, 2020
@louiemiranda
Copy link

Hi @MrAlias If I understand correctly, go-redis should be using the version of go 1.13 and not go 1.11 to run opentelemetry-go ?

louiemiranda referenced this issue in redis/go-redis Oct 12, 2020
@Aneurysm9
Copy link
Member

Hi @MrAlias If I understand correctly, go-redis should be using the version of go 1.13 and not go 1.11 to run opentelemetry-go ?

If you are using Go <1.14 you need to ensure you are using Go in module mode. From 1.14 module mode is the default. Prior to that you can specify GO111MODULE=on as an environment variable to ensure Go operates in module mode.

@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants