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

Unified Diff: infra_libs/ts_mon/config.py

Issue 1433543003: ts_mon: removed support for https:// endpoints (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 1 month 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: infra_libs/ts_mon/config.py
diff --git a/infra_libs/ts_mon/config.py b/infra_libs/ts_mon/config.py
index 3a5223468edbabc3ab7c72283c56c48d8e70b3db..9d0290ecae059a71c293fe011376a6d72bbbbe11 100644
--- a/infra_libs/ts_mon/config.py
+++ b/infra_libs/ts_mon/config.py
@@ -12,7 +12,6 @@ import re
import requests
-from infra_libs.ts_mon import api_monitor
from infra_libs.ts_mon.common import interface
from infra_libs.ts_mon.common import metric_store
from infra_libs.ts_mon.common import monitors
@@ -181,6 +180,8 @@ def process_argparse_options(args):
if args.ts_mon_credentials is not None:
credentials = args.ts_mon_credentials
+ interface.state.global_monitor = monitors.NullMonitor()
+
if endpoint.startswith('file://'):
interface.state.global_monitor = monitors.DebugMonitor(
endpoint[len('file://'):])
@@ -192,12 +193,11 @@ def process_argparse_options(args):
interface.state.global_monitor = monitors.PubSubMonitor(
credentials, project, topic, use_instrumented_http=True)
else:
- interface.state.global_monitor = api_monitor.ApiMonitor(
- credentials, endpoint, use_instrumented_http=True)
+ logging.error('Monitoring is disabled because the endpoint provided is '
+ 'invalid or not supported: %s', endpoint)
else:
- logging.error('Monitoring is disabled because --ts-mon-credentials was not '
- 'set')
- interface.state.global_monitor = monitors.NullMonitor()
+ logging.error('Monitoring is disabled because credentials are not '
+ 'available')
if args.ts_mon_target_type == 'device':
interface.state.target = targets.DeviceTarget(
@@ -230,4 +230,3 @@ def process_argparse_options(args):
interface.state.flush_thread.start()
standard_metrics.init()
-

Powered by Google App Engine
This is Rietveld 408576698