support SUBTRACT

This commit is contained in:
Ulric Qin 2020-06-20 22:59:47 +08:00
parent 4b3f11418e
commit 7d5d791376
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ func (m *MetricValue) CheckValidity(now int64) (err error) {
m.CounterType = GAUGE
}
if m.CounterType != GAUGE && m.CounterType != COUNTER {
if m.CounterType != GAUGE && m.CounterType != COUNTER && m.CounterType != SUBTRACT {
err = fmt.Errorf("wrong counter type")
return
}