package sqlx import "github.com/zeromicro/go-zero/core/metric" const namespace = "sql_client" var ( metricReqDur = metric.NewHistogramVec(&metric.HistogramVecOpts{ Namespace: namespace, Subsystem: "requests", Name: "durations_ms", Help: "mysql client requests duration(ms).", Labels: []string{"command"}, Buckets: []float64{5, 10, 25, 50, 100, 250, 500, 1000, 2500}, }) metricReqErr = metric.NewCounterVec(&metric.CounterVecOpts{ Namespace: namespace, Subsystem: "requests", Name: "error_total", Help: "mysql client requests error count.", Labels: []string{"command", "error"}, }) )