Open zdelagrange opened 4 months ago
I am unable to reproduce with OCB v0.106.0 and the following manifest:
name: otelcol-deb
description: otel collector distribution for tenable
output_path: ./otelcol-dev
otelcol_version: 0.106.0
exporters:
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.106.0
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.106.0
processors:
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.106.0
receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.106.0
I get the following logs:
2024-07-30T17:19:04.603+0200 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "0.106.0", "date": "2024-07-29T19:36:07Z"}
2024-07-30T17:19:04.605+0200 INFO internal/command.go:161 Using config file {"path": "manifest.yaml"}
2024-07-30T17:19:04.605+0200 INFO builder/config.go:142 Using go {"go-executable": "/home/pablo.baeyens/.gvm/gos/go1.22.4/bin/go"}
2024-07-30T17:19:04.606+0200 INFO builder/main.go:100 Sources created {"path": "/tmp/otelcol-distribution2888401949"}
2024-07-30T17:19:04.846+0200 INFO builder/main.go:191 Getting go modules
2024-07-30T17:19:04.896+0200 INFO builder/main.go:111 Compiling
2024-07-30T17:19:07.021+0200 INFO builder/main.go:130 Compiled {"binary": "/tmp/otelcol-distribution2888401949/otelcol-custom"}
You got same module but different versions, try force the version in go.mod. Something like:
require (
// you should use the desired version in the error log
google.golang.org/genproto v0.0.0-20240520151616-dc85e6b867a5
)
If you want to avoid go mod tidy
discard your changes, try import any modules of the package, for example type/date
:
// This is necessary to avoid ambiguous import error
// see https://github.com/open-telemetry/opentelemetry-collector/issues/10476
import _ "google.golang.org/genproto/googleapis/type/date"
I encountered the same issue, and found that the following fixed it:
go get google.golang.org/genproto/googleapis/api
go mod tidy
Describe the bug cross posting from here: https://github.com/open-telemetry/opentelemetry.io/issues/4738
After following the instructions up to Running and debugging the receiver I get unexpected output
Steps to reproduce Builder conf: