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

Unified Diff: server/cmd/logdog_collector/main.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: Specify the unit of logdog/collector/subscription/processing_time_ms with types.Milliseconds 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
« no previous file with comments | « server/cmd/logdog_archivist/main.go ('k') | server/internal/logdog/archivist/archivist.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/cmd/logdog_collector/main.go
diff --git a/server/cmd/logdog_collector/main.go b/server/cmd/logdog_collector/main.go
index 809e6c7b42f08be19afcd39d9e13ca466d405fb2..07b9829fff11f1a6075fdcff4b3928b3ff7aeed6 100644
--- a/server/cmd/logdog_collector/main.go
+++ b/server/cmd/logdog_collector/main.go
@@ -17,6 +17,7 @@ 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"
"github.com/luci/luci-go/server/internal/logdog/collector"
"github.com/luci/luci-go/server/internal/logdog/collector/coordinator"
"github.com/luci/luci-go/server/internal/logdog/service"
@@ -42,12 +43,14 @@ var (
// "transient_failure".
tsPubsubCount = metric.NewCounter("logdog/collector/subscription/count",
"The number of Pub/Sub messages pulled.",
+ types.MetricMetadata{},
field.String("result"))
// tsTaskProcessingTime tracks the amount of time a single subscription
// message takes to process, in milliseconds.
tsTaskProcessingTime = metric.NewCumulativeDistribution("logdog/collector/subscription/processing_time_ms",
"Amount of time in milliseconds that a single Pub/Sub message takes to process.",
+ types.MetricMetadata{types.Milliseconds},
distribution.DefaultBucketer)
)
« no previous file with comments | « server/cmd/logdog_archivist/main.go ('k') | server/internal/logdog/archivist/archivist.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698