MatrixSynapse/synapse/logging
David Robertson 1bfd141205
Type hints for the remaining two files in `synapse.http`. (#11164)
* 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>
2021-10-28 14:14:42 +01:00
..
__init__.py
_remote.py
_structured.py
_terse_json.py
context.py Type hints for the remaining two files in `synapse.http`. (#11164) 2021-10-28 14:14:42 +01:00
filter.py
formatter.py
handlers.py
opentracing.py
scopecontextmanager.py
utils.py Annotate `log_function` decorator (#10943) 2021-10-27 17:27:23 +01:00