summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-25 10:17:27 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-25 10:17:27 +0000
commitf9dfe7f0486ab76ab41edf6ca3c3e69f44454c51 (patch)
tree9e3d1d0ed5ee2c5e700208cf8bf0147bf8a38200
parentAdd POST /_matrix/client/r0/account/3pid/unbind (MSC2140) (#5980) (diff)
parentFix opentracing contexts missing from outbound replication requests (#5982) (diff)
downloadsynapse-f9dfe7f0486ab76ab41edf6ca3c3e69f44454c51.tar.xz
Fix opentracing contexts missing from outbound replication requests (#5982)
-rw-r--r--changelog.d/5982.bugfix1
-rw-r--r--synapse/logging/opentracing.py20
2 files changed, 17 insertions, 4 deletions
diff --git a/changelog.d/5982.bugfix b/changelog.d/5982.bugfix
new file mode 100644

index 0000000000..3ea281a3a0 --- /dev/null +++ b/changelog.d/5982.bugfix
@@ -0,0 +1 @@ +Include missing opentracing contexts in outbout replication requests. diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py
index 256b972aaa..dbf80e2024 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py
@@ -493,6 +493,11 @@ def inject_active_span_twisted_headers(headers, destination, check_destination=T Args: headers (twisted.web.http_headers.Headers) + destination (str): address of entity receiving the span context. If check_destination + is true the context will only be injected if the destination matches the + opentracing whitelist + check_destination (bool): If false, destination will be ignored and the context + will always be injected. span (opentracing.Span) Returns: @@ -525,6 +530,11 @@ def inject_active_span_byte_dict(headers, destination, check_destination=True): Args: headers (dict) + destination (str): address of entity receiving the span context. If check_destination + is true the context will only be injected if the destination matches the + opentracing whitelist + check_destination (bool): If false, destination will be ignored and the context + will always be injected. span (opentracing.Span) Returns: @@ -537,7 +547,7 @@ def inject_active_span_byte_dict(headers, destination, check_destination=True): here: https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/constants.py """ - if not whitelisted_homeserver(destination): + if check_destination and not whitelisted_homeserver(destination): return span = opentracing.tracer.active_span @@ -556,9 +566,11 @@ def inject_active_span_text_map(carrier, destination, check_destination=True): Args: carrier (dict) - destination (str): the name of the remote server. The span context - will only be injected if the destination matches the homeserver_whitelist - or destination is None. + destination (str): address of entity receiving the span context. If check_destination + is true the context will only be injected if the destination matches the + opentracing whitelist + check_destination (bool): If false, destination will be ignored and the context + will always be injected. Returns: In-place modification of carrier