You've already forked mysqld_exporter
mirror of
https://github.com/prometheus/mysqld_exporter.git
synced 2025-07-31 17:44:21 +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:
@ -22,6 +22,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
@ -137,7 +138,7 @@ func (ScrapeGlobalVariables) Version() float64 {
|
||||
}
|
||||
|
||||
// Scrape collects data from database connection and sends it over channel as prometheus metric.
|
||||
func (ScrapeGlobalVariables) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric) error {
|
||||
func (ScrapeGlobalVariables) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric, logger log.Logger) error {
|
||||
globalVariablesRows, err := db.QueryContext(ctx, globalVariablesQuery)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user