forked from TrueCloudLab/frostfs-node
[#424] metrics: Drop embedded metrics
It was not obvious where metrics are used. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
1b364d8cf4
commit
c348ae35b0
10 changed files with 173 additions and 285 deletions
|
@ -54,22 +54,22 @@ func NewInnerRingMetrics() *InnerRingServiceMetrics {
|
|||
}
|
||||
|
||||
// SetEpoch updates epoch metrics.
|
||||
func (m InnerRingServiceMetrics) SetEpoch(epoch uint64) {
|
||||
func (m *InnerRingServiceMetrics) SetEpoch(epoch uint64) {
|
||||
m.epoch.Set(float64(epoch))
|
||||
}
|
||||
|
||||
// SetHealth updates health metrics.
|
||||
func (m InnerRingServiceMetrics) SetHealth(s int32) {
|
||||
func (m *InnerRingServiceMetrics) SetHealth(s int32) {
|
||||
m.health.Set(float64(s))
|
||||
}
|
||||
|
||||
func (m InnerRingServiceMetrics) AddEvent(d time.Duration, typ string, success bool) {
|
||||
func (m *InnerRingServiceMetrics) AddEvent(d time.Duration, typ string, success bool) {
|
||||
m.eventDuration.With(prometheus.Labels{
|
||||
innerRingLabelType: typ,
|
||||
innerRingLabelSuccess: strconv.FormatBool(success),
|
||||
}).Observe(d.Seconds())
|
||||
}
|
||||
|
||||
func (m InnerRingServiceMetrics) MorphCacheMetrics() MorphCacheMetrics {
|
||||
func (m *InnerRingServiceMetrics) MorphCacheMetrics() MorphCacheMetrics {
|
||||
return m.morphCacheMetrics
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue