gosdk/metric/metric.go

19 lines
246 B
Go
Raw Normal View History

2024-01-21 18:12:39 +08:00
package metric
import (
"time"
)
func Metric(name string, value float64, tag map[string]string) {
if serv == nil {
return
}
serv.add(&metric{
Metric: name,
Value: value,
Tags: tag,
Timestamp: time.Now().Unix(),
})
}