Skip to content

Commit 651b96a

Browse files
committed
add app_name to invocation
1 parent 484c7d8 commit 651b96a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

veadk/tracing/base_tracer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,17 @@ async def on_user_message_callback(
6464
invoke_branch = (
6565
invocation_context.branch if invocation_context.branch else agent_name
6666
)
67+
current_session = invocation_context.session
68+
69+
span.set_attribute("app_name", current_session.app_name)
70+
span.set_attribute("user_id", current_session.user_id)
71+
span.set_attribute("session_id", current_session.id)
72+
6773
span.set_attribute("agent_name", agent_name)
6874
span.set_attribute("invoke_branch", invoke_branch)
6975

7076
logger.debug(
71-
f"Add attributes to {span_name}: agent_name={agent_name}, invoke_branch={invoke_branch}"
77+
f"Add attributes to {span_name}: app_name={current_session.app_name}, user_id={current_session.user_id}, session_id={current_session.id}, agent_name={agent_name}, invoke_branch={invoke_branch}"
7278
)
7379

7480
return None

0 commit comments

Comments
 (0)