summary refs log tree commit diff
path: root/docs/log_contexts.rst
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-06 15:59:20 +0100
committerErik Johnston <erik@matrix.org>2016-05-06 15:59:20 +0100
commit012cb5416cded6453e676696d74cab871db4aaf8 (patch)
tree71f21e4d6d4a6fd4037cfbf0a200667d29f46247 /docs/log_contexts.rst
parentDelete old pushers (diff)
parentMerge pull request #767 from matrix-org/erikj/transaction_txn (diff)
downloadsynapse-012cb5416cded6453e676696d74cab871db4aaf8.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/push_actions_delete
Diffstat (limited to 'docs/log_contexts.rst')
-rw-r--r--docs/log_contexts.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/log_contexts.rst b/docs/log_contexts.rst
new file mode 100644
index 0000000000..0046e171be
--- /dev/null
+++ b/docs/log_contexts.rst
@@ -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?
\ No newline at end of file