summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2018-03-12 09:45:33 +0000
committerGitHub <noreply@github.com>2018-03-12 09:45:33 +0000
commitba1d08bc4b19071c3724f78ba3f3769429e37adc (patch)
tree63d898d219b85fda5a0e9e6d86d8e258ea85cab8 /synapse/metrics/__init__.py
parentMerge pull request #2944 from matrix-org/erikj/fix_sync_race (diff)
parentAdd some docstrings to help figure this out (diff)
downloadsynapse-ba1d08bc4b19071c3724f78ba3f3769429e37adc.tar.xz
Merge pull request #2965 from matrix-org/rav/request_logging
Add a metric which increments when a request is received
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index e0cfb7d08f..50d99d7a5c 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -57,15 +57,31 @@ class Metrics(object):
         return metric
 
     def register_counter(self, *args, **kwargs):
+        """
+        Returns:
+            CounterMetric
+        """
         return self._register(CounterMetric, *args, **kwargs)
 
     def register_callback(self, *args, **kwargs):
+        """
+        Returns:
+            CallbackMetric
+        """
         return self._register(CallbackMetric, *args, **kwargs)
 
     def register_distribution(self, *args, **kwargs):
+        """
+        Returns:
+            DistributionMetric
+        """
         return self._register(DistributionMetric, *args, **kwargs)
 
     def register_cache(self, *args, **kwargs):
+        """
+        Returns:
+            CacheMetric
+        """
         return self._register(CacheMetric, *args, **kwargs)