chore: update activity metrics (#908)

This commit is contained in:
boojack
2023-01-05 20:56:50 +08:00
committed by GitHub
parent f16123a624
commit 491859bbf6
10 changed files with 78 additions and 45 deletions

View File

@@ -1,6 +1,14 @@
package metric
// Metric is the API message for metric.
type Metric struct {
ID string
Name string
Labels map[string]string
}
// Collector is the interface definition for metric collector.
type Collector interface {
Identify(id string) error
Collect(metric *Metric) error
}