synapse-product/synapse/metrics
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 Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
_exposition.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
background_process_metrics.py Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
jemalloc.py Export jemalloc stats to prometheus when used (#9882) 2021-05-06 15:54:07 +01:00