empiredan commented on code in PR #1859:
URL: 
https://github.com/apache/incubator-pegasus/pull/1859#discussion_r1457181638


##########
collector/metrics/metric_collector.go:
##########
@@ -181,6 +176,25 @@ func (collector *Collector) initMetrics() {
        }
 }
 
+// Register all metrics.
+func initMetrics() {
+       GaugeMetricsMap = make(map[string]prometheus.GaugeVec, 256)
+       CounterMetricsMap = make(map[string]prometheus.CounterVec, 256)
+       SummaryMetricsMap = make(map[string]prometheus.Summary, 256)
+       TableNameByID = make(map[string]string, 256)

Review Comment:
   Could we define these as the members of struct rather than the global 
variables ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to