From c0ad3e81836c93260570a65e8260c497c17699bc Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 8 Apr 2025 18:07:06 -0600 Subject: [PATCH] Introduce a telemetry event for when a tool finishes (#28380) This should help us understand which tools fail the most. Release Notes: - N/A --- crates/agent/src/tool_use.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/agent/src/tool_use.rs b/crates/agent/src/tool_use.rs index 8fce4ac67a1799f1d9b731543f003f5e50c5d3f7..285e72d993e72be6cf1d267e6c8b8aea29542eb6 100644 --- a/crates/agent/src/tool_use.rs +++ b/crates/agent/src/tool_use.rs @@ -334,6 +334,8 @@ impl ToolUseState { output: Result, cx: &App, ) -> Option { + telemetry::event!("Agent Tool Finished", tool_name, success = output.is_ok()); + match output { Ok(tool_result) => { let model_registry = LanguageModelRegistry::read_global(cx);