diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index 6a4629ee93..ae5ec31669 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -50,7 +50,7 @@ logger = logging.getLogger(__name__) # Block everything by default _homeserver_whitelist = None -##### Util methods +# Util methods def only_if_tracing(func): @@ -73,7 +73,7 @@ def _noop_context_manager(*args, **kwargs): yield -##### Setup +# Setup def init_tracer(config): @@ -117,7 +117,7 @@ def init_tracer(config): tags = opentracing.tags -##### Whitelisting +# Whitelisting @only_if_tracing @@ -147,7 +147,7 @@ def whitelisted_homeserver(destination): return False -##### Start spans and scopes +# Start spans and scopes # Could use kwargs but I want these to be explicit def start_active_span( @@ -271,7 +271,7 @@ def start_active_span_from_edu( return scope -###### Opentracing setters for tags, logs, etc +# Opentracing setters for tags, logs, etc @only_if_tracing @@ -306,7 +306,7 @@ def set_operation_name(operation_name): opentracing.tracer.active_span.set_operation_name(operation_name) -##### Injection and extraction +# Injection and extraction @only_if_tracing @@ -404,7 +404,7 @@ def extract_text_map(carrier): return opentracing.tracer.extract(opentracing.Format.TEXT_MAP, carrier) -##### Tracing decorators +# Tracing decorators def trace_deferred(func): @@ -529,7 +529,7 @@ def trace_servlet(servlet_name, func): return _trace_servlet_inner -##### Helper class +# Helper class class _DummyTagNames(object):