Skip to content

Commit 59305a3

Browse files
authored
uniform componentType (#48)
1 parent cf50130 commit 59305a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

exporter/exporter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (e *NebulaExporter) CollectMetrics(
134134

135135
ch <- prometheus.MustNewConstMetric(
136136
prometheus.NewDesc(
137-
fmt.Sprintf("%s_%s_%s", FQNamespace, componentType, strings.ReplaceAll(metric.Name, ".", "_")),
137+
fmt.Sprintf("%s_%s_%s", FQNamespace, strings.ReplaceAll(componentType, "-", "_"), strings.ReplaceAll(metric.Name, ".", "_")),
138138
"",
139139
labels,
140140
nil,

exporter/type.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ const (
1919
ComponentTypeGraphd = "graphd"
2020
ComponentTypeMetad = "metad"
2121
ComponentTypeStoraged = "storaged"
22-
ComponentTypeMetaListener = "meta_listener"
23-
ComponentTypeStorageListener = "storage_listener"
24-
ComponentTypeDrainer = "drainer"
22+
ComponentTypeMetaListener = "metad-listener"
23+
ComponentTypeStorageListener = "storaged-listener"
24+
ComponentTypeDrainer = "drainerd"
2525
)
2626

2727
type (

0 commit comments

Comments
 (0)