diff options
author | Paul Evans <leonerd@leonerd.org.uk> | 2016-10-21 13:06:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-21 13:06:19 +0100 |
commit | a842fed4183f3227e52fa0682e254a7cd2df6bff (patch) | |
tree | 17326c9ff939645cb5be1f28081aaa37d8d7d235 /synapse/metrics/metric.py | |
parent | Merge pull request #1175 from matrix-org/luke/feature-configurable-as-rate-li... (diff) | |
parent | Split callback metric lambda functions down onto their own lines to keep line... (diff) | |
download | synapse-a842fed4183f3227e52fa0682e254a7cd2df6bff.tar.xz |
Merge pull request #1177 from matrix-org/paul/standard-metric-names
Standardise prometheus metrics
Diffstat (limited to 'synapse/metrics/metric.py')
-rw-r--r-- | synapse/metrics/metric.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/metrics/metric.py b/synapse/metrics/metric.py index e81af29895..e87b2b80a7 100644 --- a/synapse/metrics/metric.py +++ b/synapse/metrics/metric.py @@ -98,9 +98,9 @@ class CallbackMetric(BaseMetric): value = self.callback() if self.is_scalar(): - return ["%s %d" % (self.name, value)] + return ["%s %.12g" % (self.name, value)] - return ["%s%s %d" % (self.name, self._render_key(k), value[k]) + return ["%s%s %.12g" % (self.name, self._render_key(k), value[k]) for k in sorted(value.keys())] |