Skip to content

Commit 1c47f46

Browse files
authored
Allow all input types. (elastic#12343)
1 parent ba7a60d commit 1c47f46

2 files changed

Lines changed: 1 addition & 52 deletions

File tree

internal/pkg/otel/translate/otelconfig.go

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,42 +51,7 @@ type (
5151
)
5252

5353
var (
54-
OtelSupportedOutputTypes = []string{"elasticsearch"}
55-
OtelSupportedFilebeatInputTypes = []string{
56-
"filestream",
57-
"journald",
58-
"log",
59-
"winlog",
60-
}
61-
62-
OtelSupportedMetricbeatInputTypes = []string{
63-
"activemq/metrics",
64-
"apache/metrics",
65-
"beat/metrics",
66-
"containerd/metrics",
67-
"docker/metrics",
68-
"elasticsearch/metrics",
69-
"etcd/metrics",
70-
"http/metrics",
71-
"jolokia/metrics",
72-
"kafka/metrics",
73-
"kibana/metrics",
74-
"linux/metrics",
75-
"logstash/metrics",
76-
"memcached/metrics",
77-
"mongodb/metrics",
78-
"mysql/metrics",
79-
"nats/metrics",
80-
"nginx/metrics",
81-
"prometheus/metrics",
82-
"rabbitmq/metrics",
83-
"sql/metrics",
84-
"stan/metrics",
85-
"statsd/metrics",
86-
"system/metrics",
87-
"vsphere/metrics",
88-
}
89-
OtelSupportedInputTypes = slices.Concat(OtelSupportedFilebeatInputTypes, OtelSupportedMetricbeatInputTypes)
54+
OtelSupportedOutputTypes = []string{"elasticsearch"}
9055
configTranslationFuncForExporter = map[otelcomponent.Type]exporterConfigTranslationFunc{
9156
otelcomponent.MustNewType("elasticsearch"): translateEsOutputToExporter,
9257
}
@@ -170,12 +135,6 @@ func VerifyComponentIsOtelSupported(comp *component.Component) error {
170135
return fmt.Errorf("unsupported output type: %s", comp.OutputType)
171136
}
172137

173-
// check if given input is supported in OTel runtime
174-
// this includes all metricbeat inputs and some filebeat inputs for now
175-
if !slices.Contains(OtelSupportedInputTypes, comp.InputType) {
176-
return fmt.Errorf("unsupported input type: %s", comp.InputType)
177-
}
178-
179138
// check if the actual configuration is supported. We need to actually generate the config and look for
180139
// the right kind of error
181140
_, compErr := getCollectorConfigForComponent(comp, &info.AgentInfo{}, func(unitID, binary string) map[string]any {

internal/pkg/otel/translate/otelconfig_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,16 +1107,6 @@ func TestVerifyComponentIsOtelSupported(t *testing.T) {
11071107
},
11081108
expectedError: "unsupported output type: logstash",
11091109
},
1110-
{
1111-
name: "unsupported input type",
1112-
component: &component.Component{
1113-
ID: "unsupported-input",
1114-
InputType: "stdin", // unsupported
1115-
OutputType: "elasticsearch",
1116-
OutputName: "default",
1117-
},
1118-
expectedError: "unsupported input type: stdin",
1119-
},
11201110
{
11211111
name: "unsupported configuration",
11221112
component: &component.Component{

0 commit comments

Comments
 (0)