Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions internal/pkg/otel/translate/otelconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,8 @@ var (
"log",
"winlog",
}
OtelSupportedMetricbeatInputTypes = []string{
"beat/metrics",
"http/metrics",
"kubernetes/metrics",
"linux/metrics",
"prometheus/metrics",
"system/metrics",
}
OtelSupportedInputTypes = slices.Concat(OtelSupportedFilebeatInputTypes, OtelSupportedMetricbeatInputTypes)

OtelSupportedInputTypes = OtelSupportedFilebeatInputTypes
configTranslationFuncForExporter = map[otelcomponent.Type]exporterConfigTranslationFunc{
otelcomponent.MustNewType("elasticsearch"): translateEsOutputToExporter,
}
Expand Down Expand Up @@ -134,7 +127,9 @@ func VerifyComponentIsOtelSupported(comp *component.Component) error {
return fmt.Errorf("unsupported output type: %s", comp.OutputType)
}

if !slices.Contains(OtelSupportedInputTypes, comp.InputType) {
// check if given input is supported in OTel runtime
// this includes all metricbeat inputs and some filebeat inputs for now
if !slices.Contains(OtelSupportedInputTypes, comp.InputType) && !strings.HasSuffix(comp.InputType, "/metrics") {
return fmt.Errorf("unsupported input type: %s", comp.InputType)
}

Expand Down