forked from phoenix-oss/llama-stack-mirror
fix(telemetry): query_spans (#1831)
# What does this PR do? https://github.com/meta-llama/llama-stack/pull/1828 removed __root_span__ attribute which is still needed ## Test Plan added telemetry integration test LLAMA_STACK_CONFIG=http://localhost:5001 pytest -s -v tests/integration/telemetry --safety-shield meta-llama/Llama-Guard-3-8B --text-model accounts/fireworks/models/llama-v3p3-70b-instruct
This commit is contained in:
parent
74a2584cdb
commit
a182705ade
2 changed files with 52 additions and 0 deletions
|
@ -202,6 +202,8 @@ class TelemetryAdapter(TelemetryDatasetMixin, Telemetry):
|
|||
parent_span_id = int(event.payload.parent_span_id, 16)
|
||||
parent_span = _GLOBAL_STORAGE["active_spans"].get(parent_span_id)
|
||||
context = trace.set_span_in_context(parent_span)
|
||||
else:
|
||||
event.attributes["__root_span__"] = "true"
|
||||
|
||||
span = tracer.start_span(
|
||||
name=event.payload.name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue