func (g *Gauges) Observe(stats sql.DBStats) {
	g.Idle.Set(float64(stats.Idle))
	g.InUse.Set(float64(stats.InUse))
	g.Open.Set(float64(stats.OpenConnections))
}
Observe records the DBStats collected. It should be called periodically.
package otgorm
import (
	"database/sql"
	"time"
	"github.com/go-kit/kit/metrics"
	"gorm.io/gorm"
)
type collector struct {
	factory  Factory
	gauges   *Gauges
	interval time.Duration
}
type Gauges struct {
	Idle  metrics.Gauge
	InUse metrics.Gauge
	Open  metrics.Gauge
	dbName string
	driver string
}
func (g *Gauges) DBName(dbName string) *Gauges {
	withValues := []string{"dbname", dbName}
	return &Gauges{
		Idle:   g.Idle.With(withValues...),
		InUse:  g.InUse.With(withValues...),
		Open:   g.Open.With(withValues...),
		dbName: dbName,
		driver: g.driver,
	}
}
func (g *Gauges) Driver(driver string) *Gauges {
	withValues := []string{"driver", driver}
	return &Gauges{
		Idle:   g.Idle.With(withValues...),
		InUse:  g.InUse.With(withValues...),
		Open:   g.Open.With(withValues...),
		dbName: g.dbName,
		driver: driver,
	}
}