in internal/metrics/metrics.go [179:188]
func (p *Metrics) getCollectorByNameAndType(name string, collectorType int) (prometheus.Collector, error) {
switch collectorType {
case histogram:
return p.histograms[name], nil
case gauge:
return p.histograms[name], nil
default:
return nil, fmt.Errorf("prometheus metrics get collector error, illegal collector type: %d", collectorType)
}
}