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

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
JorikSchellekens committed Jun 25, 2019
1 parent 889afc1 commit db10eeb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion synapse/config/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def default_config(self, **kwargs):
# The list is a list of regex which is matched against the user_id
user_whitelist:
- "*"
# The list of homeservers we wish to trace across
# The list of homeservers we wish to trace across
# The list is a list of regex which is matched against the homeserver name
homeserver_whitelist:
- "*"
Expand Down
2 changes: 1 addition & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _started_processing(self, servlet_name):

# Start a span
span_context = extract_span_context(self.requestHeaders)
span = opentracing.tracer.start_active_span(
opentracing.tracer.start_active_span(
"incoming-federation-request",
tags={
"request_id": self.get_request_id(),
Expand Down
10 changes: 5 additions & 5 deletions synapse/util/scopecontextmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class LogContextScopeManager(ScopeManager):
def __init__(self, config):
# Set the whitelists
logger.info(config.tracer_config)
_homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
_user_whitelist = config.tracer_config["user_whitelist"]
self._homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
self._user_whitelist = config.tracer_config["user_whitelist"]

@property
def active(self):
Expand All @@ -27,7 +27,7 @@ def active(self):
becomes an implicit parent of any newly-created Span at
Tracer.start_active_span() time.
Return:
Return:
(Scope) : the Scope that is active, or None if not
available.
"""
Expand All @@ -44,8 +44,8 @@ def activate(self, span, finish_on_close):
span (Span): the span that should become active.
finish_on_close (Boolean): whether Span should be automatically
finished when Scope.close() is called.
Return:
Return:
Scope to control the end of the active period for
*span*. It is a programming error to neglect to call
Scope.close() on the returned instance.
Expand Down
4 changes: 1 addition & 3 deletions synapse/util/tracerutils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import opentracing
from opentracing.propagation import Format

from .logcontext import LoggingContext


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

0 comments on commit db10eeb

Please sign in to comment.