mirror of
https://github.com/element-hq/synapse
synced 2024-09-20 00:35:14 +00:00
todos
This commit is contained in:
parent
322da5137f
commit
33fd24e48c
2 changed files with 6 additions and 0 deletions
|
@ -357,6 +357,7 @@ class BaseFederationServlet:
|
||||||
|
|
||||||
remote_parent_span_cm = use_span(remote_parent_span, end_on_exit=True)
|
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:
|
with remote_parent_span_cm, local_parent_span_cm:
|
||||||
if origin and self.RATELIMIT:
|
if origin and self.RATELIMIT:
|
||||||
with ratelimiter.ratelimit(origin) as d:
|
with ratelimiter.ratelimit(origin) as d:
|
||||||
|
|
|
@ -529,6 +529,11 @@ def start_active_span(
|
||||||
if opentelemetry is None:
|
if opentelemetry is None:
|
||||||
return contextlib.nullcontext() # type: ignore[unreachable]
|
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(
|
span = start_span(
|
||||||
name=name,
|
name=name,
|
||||||
context=context,
|
context=context,
|
||||||
|
|
Loading…
Reference in a new issue