stack-doctor icon indicating copy to clipboard operation
stack-doctor copied to clipboard

Unabel to build opentelemetry-traces-logs

Open lakamsani opened this issue 4 years ago • 5 comments

Hi, I'm trying to do something similar to what you have here. https://github.com/yuriatgoogle/stack-doctor/tree/master/opentelemetry-traces-logs but having trouble building/running it. Any thoughts on how to get this running? Thanks.

 opentelemetry-traces-logs git:(master) ✗ go run main.go
go: finding module for package go.opentelemetry.io/otel/api/distributedcontext
go: finding module for package go.opentelemetry.io/otel/api/core
go: finding module for package go.opentelemetry.io/otel/api/key
go: finding module for package go.opentelemetry.io/otel/plugin/httptrace
../../../../go/pkg/mod/go.opentelemetry.io/otel/exporter/trace/[email protected]/trace_proto.go:30:2: module go.opentelemetry.io/otel@latest found (v0.11.0), but does not contain package go.opentelemetry.io/otel/api/core
main.go:16:2: module go.opentelemetry.io/otel@latest found (v0.11.0), but does not contain package go.opentelemetry.io/otel/api/distributedcontext
../../../../go/pkg/mod/go.opentelemetry.io/otel/exporter/trace/[email protected]/stackdriver.go:28:2: module go.opentelemetry.io/otel@latest found (v0.11.0), but does not contain package go.opentelemetry.io/otel/api/key
main.go:23:2: module go.opentelemetry.io/otel@latest found (v0.11.0), but does not contain package go.opentelemetry.io/otel/plugin/httptrace

lakamsani avatar Sep 13 '20 23:09 lakamsani

Here is the output I see:

$ go run main.go
go: downloading cloud.google.com/go v0.47.0
go: downloading go.opentelemetry.io/otel v0.2.1
go: downloading google.golang.org/grpc v1.27.0
go: downloading github.com/gorilla/mux v1.7.3
go: downloading go.opentelemetry.io/otel/exporter/trace/stackdriver v0.2.1
go: downloading github.com/golang/protobuf v1.3.2
go: downloading google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03
go: downloading golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
go: downloading google.golang.org/api v0.11.0
go: downloading golang.org/x/net v0.0.0-20190923162816-aa69164e4478
go: downloading cloud.google.com/go/logging v1.0.0
go: downloading github.com/googleapis/gax-go/v2 v2.0.5
go: downloading golang.org/x/text v0.3.2
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: downloading go.opencensus.io v0.22.0
go: downloading github.com/google/go-cmp v0.3.1
go: downloading github.com/hashicorp/golang-lru v0.5.1
Stackdriver Logging initialized with project id stack-doctor, see Cloud  Console under GCE VM instance > all instance_id
2020/09/22 07:09:24 sleeping for: 8
2020/09/22 07:09:32 making backend request
2020/09/22 07:09:32 Sending request...
2020/09/22 07:09:35 got response: %!d(string=200 OK)
OK

This is on MacOS with go1.14.3 darwin/amd64.

Can you confirm your Go version? Can you also try manually installing the required packages using go get before running?

yuriatgoogle avatar Sep 22 '20 14:09 yuriatgoogle

Hi,

go version go1.15 darwin/amd64

go get gives the same error. I 'm on MacOS Catalina 10.15.6

lakamsani avatar Sep 22 '20 17:09 lakamsani

OK - I'm not able to reproduce the error you're seeing. Try manually installing the packages using go get ?

On Tue, Sep 22, 2020 at 10:29 AM Vamsee Lakamsani [email protected] wrote:

Hi, go version go1.15 darwin/amd64

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yuriatgoogle/stack-doctor/issues/3#issuecomment-696867007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLAPVCJB7IU2FKANRWEGTLSHDNI3ANCNFSM4RK6LE5A .

yuriatgoogle avatar Sep 27 '20 17:09 yuriatgoogle

➜  opentelemetry-traces-logs git:(master) go get go.opentelemetry.io/otel/api/core
package go.opentelemetry.io/otel/api/core: cannot find package "go.opentelemetry.io/otel/api/core" in any of:
	/usr/local/Cellar/go/1.9.1/libexec/src/go.opentelemetry.io/otel/api/core (from $GOROOT)
	/Users/vamsee/go/src/go.opentelemetry.io/otel/api/core (from $GOPATH)
➜  opentelemetry-traces-logs git:(master) go get go.opentelemetry.io/otel/api/key
package go.opentelemetry.io/otel/api/key: cannot find package "go.opentelemetry.io/otel/api/key" in any of:
	/usr/local/Cellar/go/1.9.1/libexec/src/go.opentelemetry.io/otel/api/key (from $GOROOT)
	/Users/vamsee/go/src/go.opentelemetry.io/otel/api/key (from $GOPATH)

Neither $GOROOT nor $GOPATH is set.

lakamsani avatar Oct 03 '20 15:10 lakamsani

That's really strange - "go get" should download the packages if you don't have them installed. I THINK you need to set $GOPATH and add it to $PATH.

Yuri Grinshteyn

Customer Reliability Engineering

[email protected]

On Sat, Oct 3, 2020 at 8:18 AM Vamsee Lakamsani [email protected] wrote:

➜ opentelemetry-traces-logs git:(master) go get go.opentelemetry.io/otel/api/core

package go.opentelemetry.io/otel/api/core: cannot find package "go.opentelemetry.io/otel/api/core" in any of:

/usr/local/Cellar/go/1.9.1/libexec/src/go.opentelemetry.io/otel/api/core (from $GOROOT)

/Users/vamsee/go/src/go.opentelemetry.io/otel/api/core (from $GOPATH)

➜ opentelemetry-traces-logs git:(master) go get go.opentelemetry.io/otel/api/key

package go.opentelemetry.io/otel/api/key: cannot find package "go.opentelemetry.io/otel/api/key" in any of:

/usr/local/Cellar/go/1.9.1/libexec/src/go.opentelemetry.io/otel/api/key (from $GOROOT)

/Users/vamsee/go/src/go.opentelemetry.io/otel/api/key (from $GOPATH)

Neither $GOROOT nor $GOPATH is set.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yuriatgoogle/stack-doctor/issues/3#issuecomment-703119289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLAPVCRYYV4P3SPDFFAX4DSI46EFANCNFSM4RK6LE5A .

yuriatgoogle avatar Oct 07 '20 04:10 yuriatgoogle