mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-06 22:41:57 +00:00
starting point for doc on how log contexts are supposed to work
This commit is contained in:
parent
7ea3b4118d
commit
8a04412fa1
10
docs/log_contexts.rst
Normal file
10
docs/log_contexts.rst
Normal file
@ -0,0 +1,10 @@
|
||||
What do I do about "Unexpected logging context" debug log-lines everywhere?
|
||||
|
||||
<Mjark> The logging context lives in thread local storage
|
||||
<Mjark> Sometimes it gets out of sync with what it should actually be, usually because something scheduled something to run on the reactor without preserving the logging context.
|
||||
<Matthew> what is the impact of it getting out of sync? and how and when should we preserve log context?
|
||||
<Mjark> The impact is that some of the CPU and database metrics will be under-reported, and some log lines will be mis-attributed.
|
||||
<Mjark> It should happen auto-magically in all the APIs that do IO or otherwise defer to the reactor.
|
||||
<Erik> Mjark: the other place is if we branch, e.g. using defer.gatherResults
|
||||
|
||||
Unanswered: how and when should we preserve log context?
|
Loading…
Reference in New Issue
Block a user