diff options
author | Jorik Schellekens <joriks@matrix.org> | 2019-07-11 18:23:25 +0100 |
---|---|---|
committer | Jorik Schellekens <joriks@matrix.org> | 2019-07-17 14:20:22 +0100 |
commit | 7c6bfaed11ab347b4c2afe923d069263e3b325f8 (patch) | |
tree | 23aa5308e3d78b5d9dcec9d86598c99f5f08dbfb /synapse | |
parent | Move whitelisting (diff) | |
download | synapse-7c6bfaed11ab347b4c2afe923d069263e3b325f8.tar.xz |
Sectioning comments
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/logging/opentracing.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index e9dbef0675..a6743a7139 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -339,6 +339,9 @@ def inject_active_span_twisted_headers(headers, destination): headers.addRawHeaders(key, value) +##### Injection and extraction + + @only_if_tracing def inject_active_span_byte_dict(headers, destination): """ @@ -403,6 +406,9 @@ def extract_text_map(carrier): return opentracing.tracer.extract(opentracing.Format.TEXT_MAP, carrier) +##### Tracing decorators + + def trace_deferred(func): """Decorator to trace a deferred function. Sets the operation name to that of the function's.""" @@ -551,6 +557,9 @@ def trace_servlet(servlet_name, func): return _trace_servlet_inner +##### Helper class + + class _DummyTagNames(object): """wrapper of opentracings tags. We need to have them if we want to reference them without opentracing around. Clearly they |