From 57aeb5dcfbbb256136d6c2090f755c04eae3023e Mon Sep 17 00:00:00 2001 From: Salman Paracha Date: Tue, 9 Dec 2025 17:50:23 -0800 Subject: [PATCH] improved formatting for tools in the traces --- crates/brightstaff/src/handlers/router.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/brightstaff/src/handlers/router.rs b/crates/brightstaff/src/handlers/router.rs index a8398c1a..cb4b2aa7 100644 --- a/crates/brightstaff/src/handlers/router.rs +++ b/crates/brightstaff/src/handlers/router.rs @@ -275,7 +275,11 @@ async fn build_llm_span( // Add optional attributes if let Some(tools) = tool_names { - span_builder = span_builder.with_attribute(llm::TOOLS, tools.join("\n")); + let formatted_tools = tools.iter() + .map(|name| format!("{}(...)", name)) + .collect::>() + .join("\n"); + span_builder = span_builder.with_attribute(llm::TOOLS, formatted_tools); } if let Some(preview) = user_message_preview {