summary refs log tree commit diff
path: root/synapse/metrics
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-05-09 15:31:33 +0100
committerErik Johnston <erik@matrix.org>2018-05-09 15:31:33 +0100
commit9896dab8f6cbdf1cdac4549e20e4ed0ba17d5655 (patch)
treee288da53414d96fc48ea02e38aa33a4b449c31da /synapse/metrics
parentRefactor get_recent_events_for_room return type (diff)
parentMerge pull request #3196 from matrix-org/erikj/pagination_return (diff)
downloadsynapse-9896dab8f6cbdf1cdac4549e20e4ed0ba17d5655.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fixup_return_pagination
Diffstat (limited to 'synapse/metrics')
-rw-r--r--synapse/metrics/metric.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/metrics/metric.py b/synapse/metrics/metric.py
index fbba94e633..f421e7a93f 100644
--- a/synapse/metrics/metric.py
+++ b/synapse/metrics/metric.py
@@ -71,7 +71,8 @@ class BaseMetric(object):
         """Render this metric for a single set of labels
 
         Args:
-            label_values (list[str]): values for each of the labels
+            label_values (list[object]): values for each of the labels,
+                (which get stringified).
             value: value of the metric at with these labels
 
         Returns:
@@ -324,4 +325,4 @@ def _escape_character(m):
 def _escape_label_value(value):
     """Takes a label value and escapes quotes, newlines and backslashes
     """
-    return re.sub(r"([\n\"\\])", _escape_character, value)
+    return re.sub(r"([\n\"\\])", _escape_character, str(value))