type dbStatsCollector … // NewDBStatsCollector returns a collector that exports metrics about the given *sql.DB. // See https://golang.org/pkg/database/sql/#DBStats for more information on stats. func NewDBStatsCollector(db *sql.DB, dbName string) prometheus.Collector { … } // Describe implements Collector. func (c *dbStatsCollector) Describe(ch chan<- *prometheus.Desc) { … } // Collect implements Collector. func (c *dbStatsCollector) Collect(ch chan<- prometheus.Metric) { … }