diff --git a/pkg/database/sql/CHANGELOG.md b/pkg/database/sql/CHANGELOG.md deleted file mode 100755 index 054bc765f..000000000 --- a/pkg/database/sql/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -### database/sql - -##### Version 1.3.1 -> 1. trace、metric 区别不同数据库实例(主、从) - -##### Version 1.3.0 -> 1. add slow log - -##### Version 1.2.1 -> 1.支持上报熔断错误 - -##### Version 1.2.0 -> 1.添加数据库读写分离 - -##### Version 1.1.1 -> 1.修复部分函数中的context cancel leak - -##### Version 1.1.0 -> 1.添加context和timeout支持 -> 2.添加breaker支持 -> 3.更新driver,支持context/pool timeout - -##### Version 1.0.0 -> 1.支持trace/stats diff --git a/pkg/database/sql/mysql.go b/pkg/database/sql/mysql.go index eb2e7c52a..29a1f6e4d 100644 --- a/pkg/database/sql/mysql.go +++ b/pkg/database/sql/mysql.go @@ -11,7 +11,6 @@ import ( // Config mysql config. type Config struct { - Addr string // for trace DSN string // write data source name. ReadDSN []string // read data source name. Active int // pool diff --git a/pkg/stat/metric/metric.go b/pkg/stat/metric/metric.go index 812ca7626..9ea08ca72 100644 --- a/pkg/stat/metric/metric.go +++ b/pkg/stat/metric/metric.go @@ -1,6 +1,9 @@ package metric -import "errors" +import ( + "errors" + "fmt" +) // Opts contains the common arguments for creating Metric. type Opts struct { @@ -62,6 +65,7 @@ func NewBusinessMetricCount(name string, labels ...string) CounterVec { Subsystem: _businessSubsystemCount, Name: name, Labels: labels, + Help: fmt.Sprintf("business metric count %s", name), }) } @@ -76,6 +80,7 @@ func NewBusinessMetricGauge(name string, labels ...string) GaugeVec { Subsystem: _businessSubSystemGauge, Name: name, Labels: labels, + Help: fmt.Sprintf("business metric gauge %s", name), }) } @@ -94,5 +99,6 @@ func NewBusinessMetricHistogram(name string, buckets []float64, labels ...string Name: name, Labels: labels, Buckets: buckets, + Help: fmt.Sprintf("business metric histogram %s", name), }) }