mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-05 18:22:41 +00:00
fix(telemetry): root span not yet received
# What does this PR do? ## Test Plan
This commit is contained in:
parent
cfd30d2ad5
commit
e74e0ca5a6
1 changed files with 0 additions and 12 deletions
|
@ -202,18 +202,6 @@ class TelemetryAdapter(TelemetryDatasetMixin, Telemetry):
|
||||||
parent_span_id = int(event.payload.parent_span_id, 16)
|
parent_span_id = int(event.payload.parent_span_id, 16)
|
||||||
parent_span = _GLOBAL_STORAGE["active_spans"].get(parent_span_id)
|
parent_span = _GLOBAL_STORAGE["active_spans"].get(parent_span_id)
|
||||||
context = trace.set_span_in_context(parent_span)
|
context = trace.set_span_in_context(parent_span)
|
||||||
else:
|
|
||||||
context = trace.set_span_in_context(
|
|
||||||
trace.NonRecordingSpan(
|
|
||||||
trace.SpanContext(
|
|
||||||
trace_id=int(event.trace_id, 16),
|
|
||||||
span_id=span_id,
|
|
||||||
is_remote=False,
|
|
||||||
trace_flags=trace.TraceFlags(trace.TraceFlags.SAMPLED),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
event.attributes["__root_span__"] = "true"
|
|
||||||
|
|
||||||
span = tracer.start_span(
|
span = tracer.start_span(
|
||||||
name=event.payload.name,
|
name=event.payload.name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue