From cc01175cabdb8addf93dfe1660f0eee6a9e4ce30 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Fri, 14 Nov 2025 20:35:44 +0530 Subject: [PATCH 1/2] Add support for all metricbeat input types (#11184) (cherry picked from commit 6d12db919ba1fb5293770278c1a2c9c394ab11a4) # Conflicts: # internal/pkg/otel/translate/otelconfig.go --- internal/pkg/otel/translate/otelconfig.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/pkg/otel/translate/otelconfig.go b/internal/pkg/otel/translate/otelconfig.go index 049179fbf54..3dcd1951190 100644 --- a/internal/pkg/otel/translate/otelconfig.go +++ b/internal/pkg/otel/translate/otelconfig.go @@ -50,8 +50,20 @@ type BeatMonitoringConfigGetter func(unitID, binary string) map[string]any type exporterConfigTranslationFunc func(*config.C, *logp.Logger) (map[string]any, error) var ( +<<<<<<< HEAD OtelSupportedOutputTypes = []string{"elasticsearch"} OtelSupportedInputTypes = []string{"filestream", "http/metrics", "beat/metrics", "system/metrics", "prometheus/metrics"} +======= + OtelSupportedOutputTypes = []string{"elasticsearch"} + OtelSupportedFilebeatInputTypes = []string{ + "filestream", + "journald", + "log", + "winlog", + } + + OtelSupportedInputTypes = OtelSupportedFilebeatInputTypes +>>>>>>> 6d12db919 (Add support for all metricbeat input types (#11184)) configTranslationFuncForExporter = map[otelcomponent.Type]exporterConfigTranslationFunc{ otelcomponent.MustNewType("elasticsearch"): translateEsOutputToExporter, } @@ -117,7 +129,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) } From 752c8b14de88939de1126d636f931d050f6908e4 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Mon, 1 Dec 2025 16:40:03 +0530 Subject: [PATCH 2/2] fix conflict --- internal/pkg/otel/translate/otelconfig.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/pkg/otel/translate/otelconfig.go b/internal/pkg/otel/translate/otelconfig.go index 3dcd1951190..4da72eb90c6 100644 --- a/internal/pkg/otel/translate/otelconfig.go +++ b/internal/pkg/otel/translate/otelconfig.go @@ -50,10 +50,6 @@ type BeatMonitoringConfigGetter func(unitID, binary string) map[string]any type exporterConfigTranslationFunc func(*config.C, *logp.Logger) (map[string]any, error) var ( -<<<<<<< HEAD - OtelSupportedOutputTypes = []string{"elasticsearch"} - OtelSupportedInputTypes = []string{"filestream", "http/metrics", "beat/metrics", "system/metrics", "prometheus/metrics"} -======= OtelSupportedOutputTypes = []string{"elasticsearch"} OtelSupportedFilebeatInputTypes = []string{ "filestream", @@ -63,7 +59,6 @@ var ( } OtelSupportedInputTypes = OtelSupportedFilebeatInputTypes ->>>>>>> 6d12db919 (Add support for all metricbeat input types (#11184)) configTranslationFuncForExporter = map[otelcomponent.Type]exporterConfigTranslationFunc{ otelcomponent.MustNewType("elasticsearch"): translateEsOutputToExporter, }