Skip to content

Commit ce8bc07

Browse files
authored
fix(tracing): call_type (#132)
* fix(tracing): fix distributed tracing requirments attributes * fix(tracing): fix distributed tracing requirments attributes remove unknown * fix(tracing): remove print * fix(tracing): set space_id, fix call_type * fix(tracing): fix cozeloop.call_type --------- Co-authored-by: tangou <tangou@bytedance.com>
1 parent 07840f6 commit ce8bc07

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

veadk/tracing/telemetry/telemetry.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,15 @@ def trace_call_llm(
227227
model_name=invocation_context.agent.model_name
228228
if isinstance(invocation_context.agent, Agent)
229229
else "",
230-
call_type=span.context.trace_state.get("call_type")
231-
if hasattr(span, "context")
232-
and hasattr(span.context, "trace_state")
233-
and hasattr(span.context.trace_state, "get")
234-
else "",
230+
call_type=(
231+
span.context.trace_state.get("call_type", "")
232+
if (
233+
hasattr(span, "context")
234+
and hasattr(span.context, "trace_state")
235+
and hasattr(span.context.trace_state, "get")
236+
)
237+
else ""
238+
),
235239
)
236240

237241
llm_attributes_mapping = ATTRIBUTES.get("llm", {})

0 commit comments

Comments
 (0)