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

Unified Diff: infra_libs/ts_mon/config.py

Issue 2119933003: Add Configurable metric_name_prefix (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add trailing slash 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 | « infra_libs/ts_mon/common/metrics.py ('k') | infra_libs/ts_mon/test/config_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/ts_mon/config.py
diff --git a/infra_libs/ts_mon/config.py b/infra_libs/ts_mon/config.py
index 4e0b25d2fd1a8aec1bb65b3e90d5b52b22e5cc51..8b8e75f51a0e17e67c011c46994017a9b430e98c 100644
--- a/infra_libs/ts_mon/config.py
+++ b/infra_libs/ts_mon/config.py
@@ -159,6 +159,10 @@ def add_argparse_options(parser):
help='number (e.g. for replication) of this instance of this task '
'(default: %(default)s)')
+ parser.add_argument(
+ '--ts-mon-metric-name-prefix',
+ default='/chrome/infra/',
+ help='metric name prefix for all metrics (default: %(default)s)')
def process_argparse_options(args):
"""Process command line arguments to initialize the global monitor.
@@ -212,6 +216,7 @@ def process_argparse_options(args):
hostname,
args.ts_mon_task_number)
+ interface.state.metric_name_prefix = args.ts_mon_metric_name_prefix
interface.state.global_monitor = monitors.NullMonitor()
if endpoint.startswith('file://'):
« no previous file with comments | « infra_libs/ts_mon/common/metrics.py ('k') | infra_libs/ts_mon/test/config_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698