summary refs log tree commit diff
path: root/synapse/push/httppusher.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-05-28 23:30:09 +1000
committerGitHub <noreply@github.com>2018-05-28 23:30:09 +1000
commit81717e85156abd68d70a68638a5f75149cc573f9 (patch)
tree8c302a1c18de1d46c95eeb2184d51be6482731fe /synapse/push/httppusher.py
parentMerge pull request #3288 from matrix-org/rav/no_spam_guests (diff)
parentfix up tests (diff)
downloadsynapse-81717e85156abd68d70a68638a5f75149cc573f9.tar.xz
Merge pull request #3256 from matrix-org/3218-official-prom
Switch to the Python Prometheus library
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r--synapse/push/httppusher.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index b077e1a446..bf7ff74a1a 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -20,22 +20,17 @@ from twisted.internet.error import AlreadyCalled, AlreadyCancelled
 
 from . import push_rule_evaluator
 from . import push_tools
-import synapse
 from synapse.push import PusherConfigException
 from synapse.util.logcontext import LoggingContext
 from synapse.util.metrics import Measure
 
-logger = logging.getLogger(__name__)
+from prometheus_client import Counter
 
-metrics = synapse.metrics.get_metrics_for(__name__)
+logger = logging.getLogger(__name__)
 
-http_push_processed_counter = metrics.register_counter(
-    "http_pushes_processed",
-)
+http_push_processed_counter = Counter("synapse_http_httppusher_http_pushes_processed", "")
 
-http_push_failed_counter = metrics.register_counter(
-    "http_pushes_failed",
-)
+http_push_failed_counter = Counter("synapse_http_httppusher_http_pushes_failed", "")
 
 
 class HttpPusher(object):