Skip to content

Commit

Permalink
feat: align scrapers name with v0.107.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Aug 30, 2024
1 parent c1013b4 commit 1753e4c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions remappers/hostmetrics/hostmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@ import (
const scopePrefix = "otelcol/hostmetricsreceiver"

var scraperToElasticDataset = map[string]string{
"cpu": "system.cpu",
"disk": "system.diskio",
"filesystem": "system.filesystem",
"load": "system.load",
"memory": "system.memory",
"network": "system.network",
"paging": "system.memory",
"processes": "system.process.summary",
"process": "system.process",
"cpuscraper": "system.cpu",
"diskscraper": "system.diskio",
"filesystemscraper": "system.filesystem",
"loadscraper": "system.load",
"memoryscraper": "system.memory",
"networkscraper": "system.network",
"pagingscraper": "system.memory",
"processesscraper": "system.process.summary",
"processscraper": "system.process",
}

type remapFunc func(pmetric.MetricSlice, pmetric.MetricSlice, pcommon.Resource, func(pmetric.NumberDataPoint)) error

var remapFuncs = map[string]remapFunc{
"cpu": remapCPUMetrics,
"memory": remapMemoryMetrics,
"load": remapLoadMetrics,
"process": remapProcessMetrics,
"processes": remapProcessesMetrics,
"network": remapNetworkMetrics,
"disk": remapDiskMetrics,
"filesystem": remapFilesystemMetrics,
"cpuscraper": remapCPUMetrics,
"memoryscraper": remapMemoryMetrics,
"loadscraper": remapLoadMetrics,
"processscraper": remapProcessMetrics,
"processesscraper": remapProcessesMetrics,
"networkscraper": remapNetworkMetrics,
"diskscraper": remapDiskMetrics,
"filesystemscraper": remapFilesystemMetrics,
}

// Remapper maps the OTel hostmetrics to Elastic system metrics. These remapped
Expand Down

0 comments on commit 1753e4c

Please sign in to comment.