SGLang Tracing: fix attribute errors (header extraction & bootstrap span closing) (#15693)

Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com>
Co-authored-by: ishandhanani <82981111+ishandhanani@users.noreply.github.com>
This commit is contained in:
Vladislav Nosivskoy
2025-12-28 07:44:31 +03:00
committed by GitHub
parent 656f4d69a1
commit d70c265533

View File

@@ -465,7 +465,7 @@ def trace_req_start(
if str(bootstrap_room) not in remote_trace_contexts:
attrs = {"bootstrap_room": str(hex(bootstrap_room))}
external_trace_context = _trace_context_propagator.extract(
external_trace_header
external_trace_header or {}
)
bootstrap_room_span = tracer.start_span(
name=f"Bootstrap Room {hex(bootstrap_room)}",
@@ -536,7 +536,7 @@ def trace_req_finish(
req_context.root_span.end(end_time=ts)
if str(req_context.bootstrap_room) in remote_trace_contexts:
del remote_trace_contexts[str(req_context.bootstrap_room)]
else:
elif req_context.bootstrap_room_span:
req_context.bootstrap_room_span.end(end_time=ts)
del reqs_context[rid]