mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
<!--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
15 lines
381 B
Go
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)
|
|
}
|