1. delete database/sql changelog file.

2. delete database/sql config addr param.
3. add stat/metric business metric help.
pull/269/head
shunza 5 years ago
parent d9cee15ef6
commit d09f8e2d51
  1. 24
      pkg/database/sql/CHANGELOG.md
  2. 1
      pkg/database/sql/mysql.go
  3. 8
      pkg/stat/metric/metric.go

@ -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

@ -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

@ -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),
})
}

Loading…
Cancel
Save