1
0
mirror of https://github.com/prometheus/mysqld_exporter.git synced 2025-07-30 06:43:05 +03:00

Switch to go-kit for logs.

Some log messages were made more consistent.

Logging of DSN was removed, as it may contain a password.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
This commit is contained in:
Brian Brazil
2019-09-12 14:15:58 +01:00
parent 8e4e7de3ee
commit 73160d968f
417 changed files with 3634 additions and 232853 deletions

View File

@ -21,6 +21,7 @@ import (
"fmt"
"strings"
"github.com/go-kit/kit/log"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/alecthomas/kingpin.v2"
)
@ -116,7 +117,7 @@ func (ScrapeUser) Version() float64 {
}
// Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeUser) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric) error {
func (ScrapeUser) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric, logger log.Logger) error {
var (
userRows *sql.Rows
err error