@@ -819,7 +819,7 @@ agent.monitoring.enabled: false
819819
820820// Log lines TestBeatsReceiverProcessRuntimeFallback checks for
821821const (
822- otelRuntimeUnsupportedLogLineStart = "otel runtime is not supported"
822+ otelRuntimeUnsupportedLogLineStart = "otel runtime is not supported for component "
823823 otelRuntimeMonitoringOutputUnsupportedLogLineStart = "otel runtime is not supported for monitoring output"
824824 prometheusInputSkippedLogLine = "The Otel prometheus metrics monitoring input can't run in a beats process, skipping"
825825)
@@ -842,19 +842,29 @@ func TestBeatsReceiverProcessRuntimeFallback(t *testing.T) {
842842 config := `agent.logging.to_stderr: true
843843agent.logging.to_files: false
844844inputs:
845- # Collecting system metrics
846845 - type: system/metrics
847846 id: unique-system-metrics-input
848847 _runtime_experimental: otel
849848 streams:
850849 - metricsets:
851850 - cpu
851+ - type: system/metrics
852+ id: unique-system-metrics-input-2
853+ use_output: supported
854+ _runtime_experimental: otel
855+ streams:
856+ - metricsets:
857+ - cpu
852858outputs:
853859 default:
854860 type: elasticsearch
855861 hosts: [http://localhost:9200]
856862 api_key: placeholder
857863 indices: [] # not supported by the elasticsearch exporter
864+ supported:
865+ type: elasticsearch
866+ hosts: [http://localhost:9200]
867+ api_key: placeholder
858868`
859869
860870 // this is the context for the whole test, with a global timeout defined
@@ -917,7 +927,7 @@ outputs:
917927 }
918928 })
919929
920- assert .Len (t , unsupportedLogRecords , 5 , "one log line for each component we try to run" )
930+ assert .Len (t , unsupportedLogRecords , 1 , "one log line for each component we try to run" )
921931 assert .NotEmpty (t , prometheusUnsupportedLogRecord , "should get a log line about Otel prometheus metrics input being skipped" )
922932 assert .NotEmpty (t , monitoringOutputUnsupportedLogRecord , "should get a log line about monitoring output not being supported" )
923933}
0 commit comments