[#424] metrics: Refactor engine metrics
Use histogram vector to measure request duration. Fix naming like in Prometheus best practice. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c8023a9c8d
commit
1b364d8cf4
13 changed files with 46 additions and 122 deletions
|
@ -70,8 +70,8 @@ func (m *metricsWithID) ClearErrorCounter() {
|
|||
m.mw.ClearErrorCounter(m.id)
|
||||
}
|
||||
|
||||
func (m *metricsWithID) DeleteErrorCounter() {
|
||||
m.mw.DeleteErrorCounter(m.id)
|
||||
func (m *metricsWithID) DeleteShardMetrics() {
|
||||
m.mw.DeleteShardMetrics(m.id)
|
||||
}
|
||||
|
||||
// AddShard adds a new shard to the storage engine.
|
||||
|
@ -186,7 +186,7 @@ func (e *StorageEngine) removeShards(ids ...string) {
|
|||
continue
|
||||
}
|
||||
|
||||
sh.DeleteErrorCounter()
|
||||
sh.DeleteShardMetrics()
|
||||
|
||||
ss = append(ss, sh)
|
||||
delete(e.shards, id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue