Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit db10eeb

Browse files
Code style
1 parent 889afc1 commit db10eeb

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

synapse/config/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def default_config(self, **kwargs):
5454
# The list is a list of regex which is matched against the user_id
5555
user_whitelist:
5656
- "*"
57-
# The list of homeservers we wish to trace across
57+
# The list of homeservers we wish to trace across
5858
# The list is a list of regex which is matched against the homeserver name
5959
homeserver_whitelist:
6060
- "*"

synapse/http/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def _started_processing(self, servlet_name):
239239

240240
# Start a span
241241
span_context = extract_span_context(self.requestHeaders)
242-
span = opentracing.tracer.start_active_span(
242+
opentracing.tracer.start_active_span(
243243
"incoming-federation-request",
244244
tags={
245245
"request_id": self.get_request_id(),

synapse/util/scopecontextmanager.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class LogContextScopeManager(ScopeManager):
1515
def __init__(self, config):
1616
# Set the whitelists
1717
logger.info(config.tracer_config)
18-
_homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
19-
_user_whitelist = config.tracer_config["user_whitelist"]
18+
self._homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
19+
self._user_whitelist = config.tracer_config["user_whitelist"]
2020

2121
@property
2222
def active(self):
@@ -27,7 +27,7 @@ def active(self):
2727
becomes an implicit parent of any newly-created Span at
2828
Tracer.start_active_span() time.
2929
30-
Return:
30+
Return:
3131
(Scope) : the Scope that is active, or None if not
3232
available.
3333
"""
@@ -44,8 +44,8 @@ def activate(self, span, finish_on_close):
4444
span (Span): the span that should become active.
4545
finish_on_close (Boolean): whether Span should be automatically
4646
finished when Scope.close() is called.
47-
48-
Return:
47+
48+
Return:
4949
Scope to control the end of the active period for
5050
*span*. It is a programming error to neglect to call
5151
Scope.close() on the returned instance.

synapse/util/tracerutils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import opentracing
22
from opentracing.propagation import Format
33

4-
from .logcontext import LoggingContext
5-
64

75
def extract_span_context(headers):
86
"""
@@ -30,7 +28,7 @@ def inject_span_context(headers, span):
3028
The headers set by the tracer are custom to the tracer implementation which
3129
should be unique enough that they don't interfere with any headers set by
3230
synapse or twisted. If we're still using jaeger these headers would be those
33-
here:
31+
here:
3432
https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/constants.py
3533
"""
3634
carrier = {}

0 commit comments

Comments
 (0)