mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix opentracing contexts missing from outbound replication requests (#5982)
This commit is contained in:
parent
90d17a3d28
commit
b9cfd3c375
1
changelog.d/5982.bugfix
Normal file
1
changelog.d/5982.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Include missing opentracing contexts in outbout replication requests.
|
@ -493,6 +493,11 @@ def inject_active_span_twisted_headers(headers, destination, check_destination=T
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
headers (twisted.web.http_headers.Headers)
|
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)
|
span (opentracing.Span)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -525,6 +530,11 @@ def inject_active_span_byte_dict(headers, destination, check_destination=True):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
headers (dict)
|
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)
|
span (opentracing.Span)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -537,7 +547,7 @@ def inject_active_span_byte_dict(headers, destination, check_destination=True):
|
|||||||
here:
|
here:
|
||||||
https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/constants.py
|
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
|
return
|
||||||
|
|
||||||
span = opentracing.tracer.active_span
|
span = opentracing.tracer.active_span
|
||||||
@ -556,9 +566,11 @@ def inject_active_span_text_map(carrier, destination, check_destination=True):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
carrier (dict)
|
carrier (dict)
|
||||||
destination (str): the name of the remote server. The span context
|
destination (str): address of entity receiving the span context. If check_destination
|
||||||
will only be injected if the destination matches the homeserver_whitelist
|
is true the context will only be injected if the destination matches the
|
||||||
or destination is None.
|
opentracing whitelist
|
||||||
|
check_destination (bool): If false, destination will be ignored and the context
|
||||||
|
will always be injected.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
In-place modification of carrier
|
In-place modification of carrier
|
||||||
|
Loading…
Reference in New Issue
Block a user