-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Providing an empty gomod value in the builder configuration leads to an opaque error.
Steps to reproduce
- Specify a provider, extension, receiver, exporter, processor, or connector without a
gomod
value - Try to build
- build fails with error
module "": invalid gomod specification for module
What did you expect to see?
An error with a better explanation of where the problem is in the configuration
What did you see instead?
../../bin/ocb_darwin_amd64 --config=./default.yaml
2024-06-27T11:41:54.047-0700 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "", "date": "unknown"}
2024-06-27T11:41:54.048-0700 INFO internal/command.go:161 Using config file {"path": "./default.yaml"}
Error: invalid configuration: module "": invalid gomod specification for module; module "": invalid gomod specification for module
Sample Config
dist:
module: go.opentelemetry.io/collector/cmd/otelcorecol
name: otelcorecol
description: Local OpenTelemetry Collector binary, testing only.
version: 0.103.0-dev
otelcol_version: 0.103.0
receivers:
-
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0
providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0
- gomod:
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working