From 33fd24e48c4ca82b21064830656191b4ce014828 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 1 Aug 2022 16:21:40 -0500 Subject: [PATCH] todos --- synapse/federation/transport/server/_base.py | 1 + synapse/logging/tracing.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/synapse/federation/transport/server/_base.py b/synapse/federation/transport/server/_base.py index 80abece72c..7beafe33c1 100644 --- a/synapse/federation/transport/server/_base.py +++ b/synapse/federation/transport/server/_base.py @@ -357,6 +357,7 @@ class BaseFederationServlet: remote_parent_span_cm = use_span(remote_parent_span, end_on_exit=True) + # TODO: Make sure this works (traces as expected) with remote_parent_span_cm, local_parent_span_cm: if origin and self.RATELIMIT: with ratelimiter.ratelimit(origin) as d: diff --git a/synapse/logging/tracing.py b/synapse/logging/tracing.py index 083453554f..cdc71b0544 100644 --- a/synapse/logging/tracing.py +++ b/synapse/logging/tracing.py @@ -529,6 +529,11 @@ def start_active_span( if opentelemetry is None: return contextlib.nullcontext() # type: ignore[unreachable] + # TODO: Why is this necessary to satisfy this error? It has a default? + # ` error: Argument "kind" to "start_span" of "Tracer" has incompatible type "Optional[SpanKind]"; expected "SpanKind" [arg-type]` + if kind is None: + kind = SpanKind.INTERNAL + span = start_span( name=name, context=context,