observatorium / opentelemetry-collector-builder

A CLI tool that generates OpenTelemetry Collector binaries based on a manifest.
Apache License 2.0
21 stars 2 forks source link

Release binary name replaces `amd64` with `x86_64` #26

Closed albertteoh closed 3 years ago

albertteoh commented 3 years ago

Hi,

I'd like to understand why the arch is replaced from amd64 to x86_64.

This results in a release binary name like the following: darwin_x86_64. It would be nice if the binary name could be named as darwin_amd64 as how the jaeger releases are named.

The specific motivation for this question/request is to replace the hardcoded linux_x86_64 arch in the jaeger-otel Makefile to support downloading of macOS-built binaries as part of the make build command using the values provided from the go env command, as in my current setup:

$ go env
...
GOARCH="amd64"
...
GOOS="darwin"
...

After manually downloading the binary, I noticed the following error:

$ which opentelemetry-collector-builder
/Users/albertteoh/bin/opentelemetry-collector-builder
$ opentelemetry-collector-builder
[2]    87874 killed     opentelemetry-collector-builder

However, if I obtain the binary via go get as in the README instructions, it works:

$ go get github.com/observatorium/opentelemetry-collector-builder
...
$ which opentelemetry-collector-builder
/Users/albertteoh/go/bin/opentelemetry-collector-builder
$ opentelemetry-collector-builder
2021-01-02T21:25:02.530+1100    INFO    cmd/root.go:82  OpenTelemetry Collector distribution builder    {"version": "dev", "date": "unknown"}
2021-01-02T21:25:02.532+1100    INFO    builder/main.go:80  Sources created {"path": "/var/folders/3p/yms48z2s6v7c8fy2m_1481g00000gn/T/otelcol-distribution542135792"}
2021-01-02T21:25:02.534+1100    INFO    builder/main.go:94  Using go from PATH  {"Go executable": "/usr/local/bin/go"}
2021-01-02T21:25:02.534+1100    INFO    builder/main.go:97  Compiling
^C

Perhaps I'm using the wrong build or maybe go get should be the recommended way to install & run opentelemetry-collector-builder instead of downloading the binaries?

jpkrohling commented 3 years ago

I don't think there was a specific reason for that, I'd be OK in changing that.