File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 19
19
// Package stats contains experimental metrics/stats API's.
20
20
package stats
21
21
22
+ import "google.golang.org/grpc/stats"
23
+
22
24
// MetricsRecorder records on metrics derived from metric registry.
23
25
type MetricsRecorder interface {
24
26
// RecordInt64Count records the measurement alongside labels on the int
@@ -37,3 +39,16 @@ type MetricsRecorder interface {
37
39
// gauge associated with the provided handle.
38
40
RecordInt64Gauge (handle * Int64GaugeHandle , incr int64 , labels ... string )
39
41
}
42
+
43
+ // Metrics is an experimental legacy alias of the now-stable stats.MetricSet.
44
+ // Metrics will be deleted in a future release.
45
+ type Metrics = stats.MetricSet
46
+
47
+ // Metric was replaced by direct usage of strings.
48
+ type Metric = string
49
+
50
+ // NewMetrics is an experimental legacy alias of the now-stable
51
+ // stats.NewMetricSet. NewMetrics will be deleted in a future release.
52
+ func NewMetrics (metrics ... Metric ) * Metrics {
53
+ return stats .NewMetricSet (metrics ... )
54
+ }
You can’t perform that action at this time.
0 commit comments