Files
Pablo BaeyensandGitHub c1af501cf7 [connector,exporter,processor,receiver] Error out on mismatched type (#12381)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Error out on mismatched type for all component kinds. Same as #12305 but
for all component kinds.

#### Link to tracking issue

Requires #12357
Fixes #12221
2025-02-27 12:24:18 +00:00

15 lines
381 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package internal // import "go.opentelemetry.io/collector/processor/internal"
import (
"fmt"
"go.opentelemetry.io/collector/component"
)
func ErrIDMismatch(id component.ID, typ component.Type) error {
return fmt.Errorf("component type mismatch: component ID %q does not have type %q", id, typ)
}