From 7c6bfaed11ab347b4c2afe923d069263e3b325f8 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Thu, 11 Jul 2019 18:23:25 +0100 Subject: Sectioning comments --- synapse/logging/opentracing.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit 1.5.1