Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions experimental/stats/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
// Package stats contains experimental metrics/stats API's.
package stats

import "google.golang.org/grpc/stats"

// MetricsRecorder records on metrics derived from metric registry.
type MetricsRecorder interface {
// RecordInt64Count records the measurement alongside labels on the int
Expand All @@ -37,3 +39,16 @@
// gauge associated with the provided handle.
RecordInt64Gauge(handle *Int64GaugeHandle, incr int64, labels ...string)
}

// Metrics is an experimental legacy alias of the now-stable stats.MetricSet.
// Metrics will be deleted in a future release.
type Metrics = stats.MetricSet

// Metric was replaced by direct usage of strings.
type Metric = string

// NewMetrics is an experimental legacy alias of the now-stable
// stats.NewMetricSet. NewMetrics will be deleted in a future release.
func NewMetrics(metrics ...Metric) *Metrics {
return stats.NewMetricSet(metrics...)

Check warning on line 53 in experimental/stats/metrics.go

View check run for this annotation

Codecov / codecov/patch

experimental/stats/metrics.go#L52-L53

Added lines #L52 - L53 were not covered by tests
}
Loading