package
Version:
v2.3.0+incompatible
Opens a new window with list of versions in this module.
Published: Feb 11, 2020
License: AGPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 7
Opens a new window with list of known importers.
Documentation
¶
Package sqlmetrics provides Prometheus metrics for database/sql.
type Collector struct {
}
Collector is a prometheus.Collector that exposes *sql.DB metrics.
NewCollector creates a new collector.
Reform is a SQL logger with metrics.
func NewReform(driver, dbName string, printf reform.Printf) *Reform
NewReform creates a new logger with given parameters.
After implements reform.Logger.
Before implements reform.Logger.
Collect implements prom.Collector.
Describe implements prom.Collector.
Requests returns a total number of queries started.
Reset sets all metrics to 0.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.