mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 10:23:57 +01:00
Don't forbid '_' in metric basenames any more, to allow things like foo_time
This commit is contained in:
parent
f1fbe3e09f
commit
493e3fa0ca
1 changed files with 0 additions and 5 deletions
|
@ -43,11 +43,6 @@ class Metrics(object):
|
||||||
self.name_prefix = name
|
self.name_prefix = name
|
||||||
|
|
||||||
def _register(self, metric_class, name, *args, **kwargs):
|
def _register(self, metric_class, name, *args, **kwargs):
|
||||||
if "_" in name:
|
|
||||||
raise ValueError("Metric names %s is invalid as it cannot contain an underscore"
|
|
||||||
% (name)
|
|
||||||
)
|
|
||||||
|
|
||||||
full_name = "%s_%s" % (self.name_prefix, name)
|
full_name = "%s_%s" % (self.name_prefix, name)
|
||||||
|
|
||||||
metric = metric_class(full_name, *args, **kwargs)
|
metric = metric_class(full_name, *args, **kwargs)
|
||||||
|
|
Loading…
Reference in a new issue