File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
exporter/elasticsearchexporter Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,15 @@ func routeRecord(
191191 if selfTelemetryScopeNames [scope .Name ()] {
192192 // For collector self-telemetry, use a fixed dataset name
193193 dataset = collectorSelfTelemetryDataStreamDataset
194- } else if submatch := receiverRegex . FindStringSubmatch ( scope . Name ()); len ( submatch ) > 0 {
194+ } else {
195195 // Receiver-based routing
196196 // For example, hostmetricsreceiver (or hostmetricsreceiver.otel in the OTel output mode)
197197 // for the scope name
198198 // github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper
199- receiverName := submatch [1 ]
200- dataset = receiverName
199+ loc := receiverRegex .FindStringSubmatchIndex (scope .Name ())
200+ if len (loc ) == 4 {
201+ dataset = scope .Name ()[loc [2 ]:loc [3 ]]
202+ }
201203 }
202204 }
203205
You can’t perform that action at this time.
0 commit comments