Merge pull request #306 from bilibili/util/metrics_20198297376
add metrics to databusutil and pipelinepull/322/head
commit
1a5b846cbc
@ -0,0 +1,9 @@ |
||||
### pipeline |
||||
|
||||
#### Version 1.2.0 |
||||
> 1. 默认为平滑触发事件 |
||||
> 2. 增加metric上报 |
||||
#### Version 1.1.0 |
||||
> 1. 增加平滑时间的支持 |
||||
#### Version 1.0.0 |
||||
> 1. 提供聚合方法 内部区分压测流量 |
@ -0,0 +1,6 @@ |
||||
### pipeline/fanout |
||||
|
||||
#### Version 1.1.0 |
||||
> 1. 增加处理速度metric上报 |
||||
#### Version 1.0.0 |
||||
> 1. library/cache包改为fanout |
@ -1,15 +1,27 @@ |
||||
package fanout |
||||
|
||||
import "github.com/bilibili/kratos/pkg/stat/metric" |
||||
import ( |
||||
"github.com/bilibili/kratos/pkg/stat/metric" |
||||
) |
||||
|
||||
const namespace = "sync" |
||||
const ( |
||||
_metricNamespace = "sync" |
||||
_metricSubSystem = "pipeline_fanout" |
||||
) |
||||
|
||||
var ( |
||||
_metricChanSize = metric.NewGaugeVec(&metric.GaugeVecOpts{ |
||||
Namespace: namespace, |
||||
Subsystem: "pipeline_fanout", |
||||
Name: "current", |
||||
Namespace: _metricNamespace, |
||||
Subsystem: _metricSubSystem, |
||||
Name: "chan_len", |
||||
Help: "sync pipeline fanout current channel size.", |
||||
Labels: []string{"name"}, |
||||
}) |
||||
_metricCount = metric.NewCounterVec(&metric.CounterVecOpts{ |
||||
Namespace: _metricNamespace, |
||||
Subsystem: _metricSubSystem, |
||||
Name: "process_count", |
||||
Help: "process count", |
||||
Labels: []string{"name"}, |
||||
}) |
||||
) |
||||
|
Loading…
Reference in new issue