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

Unified Diff: infra_libs/ts_mon/common/metrics.py

Issue 1720323002: Update metrics.proto, and set metric descriptions in MetricsData messages (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Undo the go link change Created 4 years, 10 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 | « no previous file | infra_libs/ts_mon/common/test/metrics_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/ts_mon/common/metrics.py
diff --git a/infra_libs/ts_mon/common/metrics.py b/infra_libs/ts_mon/common/metrics.py
index e68e7408b1969761b46934af5fd846e91f06a647..bfaf7f223e56a011057fa5c7cdd94118e6de6e1a 100644
--- a/infra_libs/ts_mon/common/metrics.py
+++ b/infra_libs/ts_mon/common/metrics.py
@@ -63,8 +63,6 @@ class Metric(object):
raise errors.MonitoringTooManyFieldsError(self._name, fields)
self._fields = fields
self._normalized_fields = self._normalize_fields(self._fields)
- # pgervais: Yes, description is unused. Waiting for the rest of the pipeline
- # to support it.
self._description = description
interface.register(self)
@@ -101,6 +99,8 @@ class Metric(object):
metric_pb = collection_pb.data.add()
metric_pb.metric_name_prefix = '/chrome/infra/'
metric_pb.name = self._name
+ if self._description is not None:
+ metric_pb.description = self._description
self._populate_value(metric_pb, value, start_time)
self._populate_fields(metric_pb, fields)
« no previous file with comments | « no previous file | infra_libs/ts_mon/common/test/metrics_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698