@@ -47,12 +47,28 @@ const (
4747)
4848
4949// BeatMonitoringConfigGetter is a function that returns the monitoring configuration for a beat receiver.
50- type BeatMonitoringConfigGetter func (unitID , binary string ) map [string ]any
51- type exporterConfigTranslationFunc func (* config.C , * logp.Logger ) (map [string ]any , error )
50+ type (
51+ BeatMonitoringConfigGetter func (unitID , binary string ) map [string ]any
52+ exporterConfigTranslationFunc func (* config.C , * logp.Logger ) (map [string ]any , error )
53+ )
5254
5355var (
54- OtelSupportedOutputTypes = []string {"elasticsearch" }
55- OtelSupportedInputTypes = []string {"filestream" , "http/metrics" , "beat/metrics" , "system/metrics" , "prometheus/metrics" }
56+ OtelSupportedOutputTypes = []string {"elasticsearch" }
57+ OtelSupportedFilebeatInputTypes = []string {
58+ "filestream" ,
59+ "journald" ,
60+ "log" ,
61+ "winlog" ,
62+ }
63+ OtelSupportedMetricbeatInputTypes = []string {
64+ "beat/metrics" ,
65+ "http/metrics" ,
66+ "kubernetes/metrics" ,
67+ "linux/metrics" ,
68+ "prometheus/metrics" ,
69+ "system/metrics" ,
70+ }
71+ OtelSupportedInputTypes = slices .Concat (OtelSupportedFilebeatInputTypes , OtelSupportedMetricbeatInputTypes )
5672 configTranslationFuncForExporter = map [otelcomponent.Type ]exporterConfigTranslationFunc {
5773 otelcomponent .MustNewType ("elasticsearch" ): translateEsOutputToExporter ,
5874 }
@@ -211,13 +227,11 @@ func getCollectorConfigForComponent(
211227 beatMonitoringConfigGetter BeatMonitoringConfigGetter ,
212228 logger * logp.Logger ,
213229) (* confmap.Conf , error ) {
214-
215230 exportersConfig , outputQueueConfig , extensionConfig , err := getExportersConfigForComponent (comp , logger )
216231 if err != nil {
217232 return nil , err
218233 }
219234 receiversConfig , err := getReceiversConfigForComponent (comp , info , outputQueueConfig , beatMonitoringConfigGetter )
220-
221235 if err != nil {
222236 return nil , err
223237 }
@@ -233,7 +247,7 @@ func getCollectorConfigForComponent(
233247 }
234248
235249 // we need to convert []string to []interface for this to work
236- extensionKey := make ([]interface {} , len (maps .Keys (extensionConfig )))
250+ extensionKey := make ([]any , len (maps .Keys (extensionConfig )))
237251 for i , v := range maps .Keys (extensionConfig ) {
238252 extensionKey [i ] = v
239253 }
@@ -301,13 +315,13 @@ func getReceiversConfigForComponent(
301315 // adds additional context on logs emitted by beatreceivers to uniquely identify per component logs
302316 "logging" : map [string ]any {
303317 "with_fields" : map [string ]any {
304- "component" : map [string ]interface {} {
318+ "component" : map [string ]any {
305319 "id" : comp .ID ,
306320 "binary" : binaryName ,
307321 "dataset" : dataset ,
308322 "type" : comp .InputType ,
309323 },
310- "log" : map [string ]interface {} {
324+ "log" : map [string ]any {
311325 "source" : comp .ID ,
312326 },
313327 },
0 commit comments