diff --git a/client/operation.go b/client/operation.go index c165cb8..8686c8a 100644 --- a/client/operation.go +++ b/client/operation.go @@ -297,12 +297,11 @@ func (hc *houstonClient) launch(meta *procmeta) error { logger.Println("unmarshal metric failed :", err, string(metricBuffer)) continue } - if index != 0 { - if desc.ConstLabels == nil { - desc.ConstLabels = make(map[string]string) - } - desc.ConstLabels["index"] = fmt.Sprintf("%d", index) + + if desc.ConstLabels == nil { + desc.ConstLabels = make(map[string]string) } + desc.ConstLabels["index"] = fmt.Sprintf("%d", index) metricExporter.RegisterMetric(&desc) } else {