Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: appengine/tsmon/grpc.go

Issue 2123853002: Added unit annotation supports onto tsmon in go. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/tsmon/grpc.go
diff --git a/appengine/tsmon/grpc.go b/appengine/tsmon/grpc.go
index 4e0768863770aa1e4f32465d4f038e23b754add0..84772cc02f75e5a91066335820253b83651d458d 100644
--- a/appengine/tsmon/grpc.go
+++ b/appengine/tsmon/grpc.go
@@ -14,18 +14,21 @@ import (
"github.com/luci/luci-go/common/tsmon/distribution"
"github.com/luci/luci-go/common/tsmon/field"
"github.com/luci/luci-go/common/tsmon/metric"
+ "github.com/luci/luci-go/common/tsmon/types"
)
var (
grpcServerCount = metric.NewCounter(
"grpc/server/count",
"Total number of RPCs.",
+ types.MetricMetadata{},
field.String("method"), // full name of the grpc method
field.Int("code")) // grpc.Code of the result
grpcServerDuration = metric.NewCumulativeDistribution(
"grpc/server/duration",
"Distribution of server-side RPC duration (in milliseconds).",
+ types.MetricMetadata{},
distribution.DefaultBucketer,
field.String("method"), // full name of the grpc method
field.Int("code")) // grpc.Code of the result

Powered by Google App Engine
This is Rietveld 408576698