Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | run isort | Amber Brown | 2018-07-09 | 1 | -1/+1 |
| | |||||
* | replace invalid utf8 with \ufffd | Matthew Hodgson | 2018-07-02 | 1 | -2/+2 |
| | |||||
* | a fix which doesn't NPE everywhere | Matthew Hodgson | 2018-07-01 | 1 | -9/+17 |
| | |||||
* | don't mix unicode strings with utf8-in-byte-strings | Matthew Hodgson | 2018-07-01 | 1 | -2/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | otherwise we explode with: ``` Traceback (most recent call last): File /usr/lib/python2.7/logging/handlers.py, line 78, in emit logging.FileHandler.emit(self, record) File /usr/lib/python2.7/logging/__init__.py, line 950, in emit StreamHandler.emit(self, record) File /usr/lib/python2.7/logging/__init__.py, line 887, in emit self.handleError(record) File /usr/lib/python2.7/logging/__init__.py, line 810, in handleError None, sys.stderr) File /usr/lib/python2.7/traceback.py, line 124, in print_exception _print(file, 'Traceback (most recent call last):') File /usr/lib/python2.7/traceback.py, line 13, in _print file.write(str+terminator) File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_io.py, line 170, in write self.log.emit(self.level, format=u{log_io}, log_io=line) File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 144, in emit self.observer(event) File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 136, in __call__ errorLogger = self._errorLoggerForObserver(brokenObserver) File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 156, in _errorLoggerForObserver if obs is not observer File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 81, in __init__ self.log = Logger(observer=self) File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 64, in __init__ namespace = self._namespaceFromCallingContext() File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 42, in _namespaceFromCallingContext return currentframe(2).f_globals[__name__] File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/python/compat.py, line 93, in currentframe for x in range(n + 1): RuntimeError: maximum recursion depth exceeded while calling a Python object Logged from file site.py, line 129 File /usr/lib/python2.7/logging/__init__.py, line 859, in emit msg = self.format(record) File /usr/lib/python2.7/logging/__init__.py, line 732, in format return fmt.format(record) File /usr/lib/python2.7/logging/__init__.py, line 471, in format record.message = record.getMessage() File /usr/lib/python2.7/logging/__init__.py, line 335, in getMessage msg = msg % self.args UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128) Logged from file site.py, line 129 ``` ...where the logger apparently recurses whilst trying to log the error, hitting the maximum recursion depth and killing everything badly. | ||||
* | Log number of events fetched from DB | Richard van der Hoff | 2018-06-21 | 1 | -1/+4 |
| | | | | | | | | | | When we finish processing a request, log the number of events we fetched from the database to handle it. [I'm trying to figure out which requests are responsible for large amounts of event cache churn. It may turn out to be more helpful to add counts to the prometheus per-request/block metrics, but that is an extension to this code anyway.] | ||||
* | factor out uri redaction into a method on http | Michael Telatynski | 2018-06-05 | 1 | -7/+2 |
| | |||||
* | update metrics to be in seconds | Amber Brown | 2018-05-28 | 1 | -10/+10 |
| | |||||
* | Merge pull request #3246 from NotAFile/py3-repr-string | Amber Brown | 2018-05-24 | 1 | -1/+1 |
|\ | | | | | use repr, not str | ||||
| * | use repr, not str | Adrian Tschira | 2018-05-19 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | Add in flight request metrics | Erik Johnston | 2018-05-21 | 1 | -1/+3 |
|/ | | | | | This tracks CPU and DB usage while requests are in flight, rather than when we write the response. | ||||
* | Set Server header in SynapseRequest | Richard van der Hoff | 2018-05-10 | 1 | -1/+10 |
| | | | | | | | | | | | | (instead of everywhere that writes a response. Or rather, the subset of places which write responses where we haven't forgotten it). This also means that we don't have to have the mysterious version_string attribute in anything with a request handler. Unfortunately it does mean that we have to pass the version string wherever we instantiate a SynapseSite, which has been c&ped 150 times, but that is code that ought to be cleaned up anyway really. | ||||
* | Move RequestMetrics handling into SynapseRequest.processing() | Richard van der Hoff | 2018-05-10 | 1 | -11/+58 |
| | | | | | It fits quite nicely here, and opens the path to getting rid of the "include_metrics" mess. | ||||
* | Move request_id management into SynapseRequest | Richard van der Hoff | 2018-05-10 | 1 | -0/+9 |
| | |||||
* | Add b prefixes to some strings that are bytes in py3 | Adrian Tschira | 2018-04-04 | 1 | -3/+3 |
| | | | | | | This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Track DB scheduling delay per-request | Richard van der Hoff | 2018-01-16 | 1 | -1/+3 |
| | | | | | | For each request, track the amount of time spent waiting for a db connection. This entails adding it to the LoggingContext and we may as well add metrics for it while we are passing. | ||||
* | Track db txn time in millisecs | Richard van der Hoff | 2018-01-16 | 1 | -3/+3 |
| | | | | ... to reduce the amount of floating-point foo we do. | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -1/+1 |
| | | | | what could possibly go wrong | ||||
* | Move SynapseSite to its own file | Mark Haines | 2016-04-22 | 1 | -0/+146 |