summary refs log tree commit diff
path: root/synapse/metrics
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-07-08 15:49:23 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-07-08 15:49:23 +0100
commit57eacee4f4cff3a663a6e22834a82f9c5783a56d (patch)
treeb5714f78b8c129ad8aca1689e2d7ddecb20c3bed /synapse/metrics
parentChangelog (diff)
parentUpdate ModuleApi to avoid register(generate_token=True) (#5640) (diff)
downloadsynapse-57eacee4f4cff3a663a6e22834a82f9c5783a56d.tar.xz
Merge branch 'develop' into babolivier/invite-json
Diffstat (limited to 'synapse/metrics')
-rw-r--r--synapse/metrics/__init__.py5
-rw-r--r--synapse/metrics/background_process_metrics.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index 1f30179b51..eaf0aaa86e 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -437,7 +437,10 @@ def runUntilCurrentTimer(func):
         counts = gc.get_count()
         for i in (2, 1, 0):
             if threshold[i] < counts[i]:
-                logger.info("Collecting gc %d", i)
+                if i == 0:
+                    logger.debug("Collecting gc %d", i)
+                else:
+                    logger.info("Collecting gc %d", i)
 
                 start = time.time()
                 unreachable = gc.collect(i)
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py
index 167e2c068a..edd6b42db3 100644
--- a/synapse/metrics/background_process_metrics.py
+++ b/synapse/metrics/background_process_metrics.py
@@ -22,7 +22,7 @@ from prometheus_client.core import REGISTRY, Counter, GaugeMetricFamily
 
 from twisted.internet import defer
 
-from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
+from synapse.logging.context import LoggingContext, PreserveLoggingContext
 
 logger = logging.getLogger(__name__)