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

Commit 33fd24e

Browse files
committed
todos
1 parent 322da51 commit 33fd24e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

synapse/federation/transport/server/_base.py

+1
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ async def new_func(
357357

358358
remote_parent_span_cm = use_span(remote_parent_span, end_on_exit=True)
359359

360+
# TODO: Make sure this works (traces as expected)
360361
with remote_parent_span_cm, local_parent_span_cm:
361362
if origin and self.RATELIMIT:
362363
with ratelimiter.ratelimit(origin) as d:

synapse/logging/tracing.py

+5
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,11 @@ def start_active_span(
529529
if opentelemetry is None:
530530
return contextlib.nullcontext() # type: ignore[unreachable]
531531

532+
# TODO: Why is this necessary to satisfy this error? It has a default?
533+
# ` error: Argument "kind" to "start_span" of "Tracer" has incompatible type "Optional[SpanKind]"; expected "SpanKind" [arg-type]`
534+
if kind is None:
535+
kind = SpanKind.INTERNAL
536+
532537
span = start_span(
533538
name=name,
534539
context=context,

0 commit comments

Comments
 (0)