-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Component(s)
cmd/otelcorecol
What happened?
Describe the bug
Title
components command lists OTLP exporters twice (duplicate canonical entries) due to alias
Description
After upgrading to OpenTelemetry Collector v0.144.0, the generated collector’s components command outputs duplicate entries for OTLP exporters. The duplicates are not alias/canonical pairs; they are two identical canonical entries each for otlp_grpc and otlp_http.
Impact
- Breaks tests that compare
componentsoutput with the manifest (counts inflate). - Masks real double-registration bugs during validation.
Environment
- Core: v0.144.0
- Contrib: v0.144.0
- OS/Arch: observed on darwin/arm64 and linux/amd64
- Built via
cmd/builder; using thecomponentssubcommand to dump YAML.
Steps to reproduce
- Build a custom collector with builder (v0.144.0) including:
go.opentelemetry.io/collector/exporter/otlpexportergo.opentelemetry.io/collector/exporter/otlphttpexporter
- Run:
./your-collector-binary components
- Inspect the exporters in the YAML output.
What did you expect to see?
Each exporter should be listed exactly once. If deprecated aliases are included for compatibility, they should not cause duplicate canonical entries in the output.
What did you see instead?
otlp_grpc and otlp_http each appear twice with identical name/module/stability.
Collector version
v0.144.0
Environment information
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
exporters:
otlp_grpc:
endpoint: https://localhost:4312
otlp_http:
endpoint: https://localhost:7821Log output
- name: otlp_grpc
module: go.opentelemetry.io/collector/exporter/otlpexporter v0.144.0
stability:
logs: Stable
metrics: Stable
traces: Stable
- name: otlp_grpc
module: go.opentelemetry.io/collector/exporter/otlpexporter v0.144.0
stability:
logs: Stable
metrics: Stable
traces: Stable
- name: otlp_http
module: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.144.0
stability:
logs: Stable
metrics: Stable
traces: Stable
- name: otlp_http
module: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.144.0
stability:
logs: Stable
metrics: Stable
traces: StableAdditional context
- Recent rename + alias support (
otlp→otlp_grpc,otlphttp→otlp_http) may interact with module/alias mapping in the generatedcomponentscommand: the alias is a separate type entry, but the components command prints only the canonical “name” (after normalization), not the alias string. So both the canonical and its alias end up rendered with the same name/module/stability, making them appear as identical duplicates.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.