mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-12 14:46:37 -05:00
fixes
This commit is contained in:
parent
228f1f584e
commit
85ba83eb51
7 changed files with 52 additions and 24 deletions
|
|
@ -29,12 +29,20 @@ from twisted.internet import reactor
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
running_on_pypy = platform.python_implementation() == 'PyPy'
|
||||
all_metrics = []
|
||||
all_collectors = []
|
||||
all_gauges = {}
|
||||
|
||||
|
||||
class RegistryProxy(object):
|
||||
|
||||
def collect(self):
|
||||
for metric in REGISTRY.collect():
|
||||
if not metric.name.startswith("__"):
|
||||
yield metric
|
||||
|
||||
|
||||
@attr.s(hash=True)
|
||||
class LaterGauge(object):
|
||||
|
||||
|
|
@ -45,7 +53,7 @@ class LaterGauge(object):
|
|||
|
||||
def collect(self):
|
||||
|
||||
g = GaugeMetricFamily(self.name, self.desc, self.labels)
|
||||
g = GaugeMetricFamily(self.name, self.desc, labels=self.labels)
|
||||
|
||||
try:
|
||||
calls = self.caller()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue