summary refs log tree commit diff
path: root/synapse/http/request_metrics.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Type hints for the remaining two files in `synapse.http`. (#11164)David Robertson2021-10-281-17/+33
| | | | | | | | | | | | | | | | | | | * Teach MyPy that the sentinel context is False This means that if `ctx: LoggingContextOrSentinel` then `bool(ctx)` narrows us to `ctx:LoggingContext`, which is a really neat find! * Annotate RequestMetrics - Raise errors for sentry if we use the sentinel context - Ensure we don't raise an error and carry on, but not recording stats - Include stack trace in the error case to lower Sean's blood pressure * Make mypy pass for synapse.http.request_metrics * Make synapse.http.connectproxyclient pass mypy Co-authored-by: reivilibre <oliverw@matrix.org>
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+1
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Fix typos and spelling errors. (#8639)Patrick Cloke2020-10-231-1/+1
|
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-1/+1
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Make the metrics less racy (#4061)Amber Brown2018-10-191-13/+18
|
* Fix more b'abcd' noise in metricsRichard van der Hoff2018-09-171-11/+11
|
* Fix typoErik Johnston2018-08-211-4/+4
|
* Make the in flight requests metrics thread safeErik Johnston2018-08-201-3/+10
|
* pep8Erik Johnston2018-07-181-1/+2
|
* Add response code to response timer metricsErik Johnston2018-07-181-3/+5
|
* Refactor logcontext resource usage tracking (#3501)Richard van der Hoff2018-07-101-66/+17
| | | | | Factor out the resource usage tracking out to a separate object, which can be passed around and copied independently of the logcontext itself.
* run isortAmber Brown2018-07-091-1/+1
|
* Fix inflight requests metric (incorrect name & traceback) (#3413)Amber Brown2018-06-201-3/+7
|
* update to more consistently use seconds in any metrics or loggingAmber Brown2018-05-281-19/+19
|
* update metrics to be in secondsAmber Brown2018-05-281-3/+3
|
* fixesAmber Brown2018-05-231-7/+7
|
* cleanup pep8 errorsAmber Brown2018-05-221-28/+86
|
* cleanups, self-registrationAmber Brown2018-05-221-12/+3
|
* Merge remote-tracking branch 'origin/develop' into 3218-official-promAmber Brown2018-05-221-1/+136
|\
| * Don't store contextErik Johnston2018-05-221-8/+5
| |
| * Move in_flight_requests_count to be a callback metricErik Johnston2018-05-221-10/+21
| |
| * Add in flight request metricsErik Johnston2018-05-211-1/+151
| | | | | | | | | | This tracks CPU and DB usage while requests are in flight, rather than when we write the response.
* | rest of the changesAmber Brown2018-05-211-83/+23
|/
* Move outgoing_responses_counter handling to RequestMetricsRichard van der Hoff2018-05-101-0/+2
| | | | it's much neater there.
* Make RequestMetrics take a raw time rather than a clockRichard van der Hoff2018-05-101-4/+4
| | | | ... which is going to make it easier to move around.
* Move RequestsMetrics to its own fileRichard van der Hoff2018-05-091-0/+147
This is useful in its own right, because server.py is full of stuff; but more importantly, I want to do some refactoring that will cause a circular reference as it is.