diff options
author | Jorik Schellekens <joriks@matrix.org> | 2019-07-17 11:52:27 +0100 |
---|---|---|
committer | Jorik Schellekens <joriks@matrix.org> | 2019-07-17 14:22:55 +0100 |
commit | 3e5f4a40ded0b1b8c2da8dca9df4b03791f8f0c7 (patch) | |
tree | 4375cc7c9746e976b30cbed0478bd05a2f3667e9 | |
parent | Noop if opentracing is disabled (diff) | |
download | synapse-3e5f4a40ded0b1b8c2da8dca9df4b03791f8f0c7.tar.xz |
Unbreak json parsing.
-rw-r--r-- | synapse/logging/opentracing.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index 4f85412631..3374c41591 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -391,13 +391,11 @@ def inject_active_span_text_map(carrier, destination=None): def active_span_context_as_string(): - if not opentracing: - return None - carrier = {} - opentracing.tracer.inject( - opentracing.tracer.active_span, opentracing.Format.TEXT_MAP, carrier - ) + if opentracing: + opentracing.tracer.inject( + opentracing.tracer.active_span, opentracing.Format.TEXT_MAP, carrier + ) return json.dumps(carrier) |