lightstep / telemetry-generator

An opentelemetry receiver that generates configurable metrics & traces to emulate live services
Apache License 2.0
18 stars 8 forks source link

🐛 [BUG] - opentelemetry-collector-builder --config didn't work #21

Open dimitrisfinas opened 2 years ago

dimitrisfinas commented 2 years ago

Description

when running command "opentelemetry-collector-builder --config config/builder-config.yml", I got error: Error: failed to compile the OpenTelemetry Collector distribution: exit status 2. Output: "# github.com/lightstep/telemetry-generator/generatorreceiver/internal/topology\n../generatorreceiver/internal/topology/pickable.go:18:6: missing function body\n../generatorreceiver/internal/topology/pickable.go:18:23: syntax error: unexpected [, expecting (\n../generatorreceiver/internal/topology/pickable.go:20:2: syntax error: non-declaration statement outside function body\n../generatorreceiver/internal/topology/pickable.go:39:2: syntax error: non-declaration statement outside function body\nnote: module requires Go 1.18\n"

but when I followed instructions to install the builder, I encountered no issues

Reproduction URL

https://github.com/lightstep/telemetry-generator

Reproduction steps

1. Follow instructions from README to install opentelemetry-collector-builder
2. Clone the telemetry-generator project
3. Run command opentelemetry-collector-builder --config config/builder-config.yml
4. See error I got in description

Screenshots

![DESCRIPTION](LINK.png)

Logs

full stack:
2022-09-29T07:59:12.531Z        INFO    cmd/root.go:99  OpenTelemetry Collector distribution builder    {"version": "dev", "date": "unknown"}
2022-09-29T07:59:12.531Z        INFO    cmd/root.go:115 Using config file       {"path": "config/builder-config.yml"}
2022-09-29T07:59:12.532Z        INFO    builder/config.go:102   Using go        {"Go executable": "/usr/bin/go"}
2022-09-29T07:59:12.533Z        INFO    builder/main.go:87      Sources created {"path": "build"}
2022-09-29T07:59:47.137Z        INFO    builder/main.go:119     Getting go modules
2022-09-29T08:00:00.579Z        INFO    builder/main.go:98      Compiling
Error: failed to compile the OpenTelemetry Collector distribution: exit status 2. Output: "# github.com/lightstep/telemetry-generator/generatorreceiver/internal/topology\n../generatorreceiver/internal/topology/pickable.go:18:6: missing function body\n../generatorreceiver/internal/topology/pickable.go:18:23: syntax error: unexpected [, expecting (\n../generatorreceiver/internal/topology/pickable.go:20:2: syntax error: non-declaration statement outside function body\n../generatorreceiver/internal/topology/pickable.go:39:2: syntax error: non-declaration statement outside function body\nnote: module requires Go 1.18\n"

Browsers

Chrome

OS

Linux

dimitrisfinas commented 2 years ago

I solved the issue by manually install go version 1.18 as explained here https://nextgentips.com/2021/12/23/how-to-install-go-1-18-on-ubuntu-20-04/ I think you should put GO v1.18 minimum as a requirement as the default version on my linux repository is v1.17

njvrzm commented 2 years ago

We'll update that, thank you!