diff --git a/crates/goose-cli/src/cli.rs b/crates/goose-cli/src/cli.rs index 37819d631a..27a04dd38d 100644 --- a/crates/goose-cli/src/cli.rs +++ b/crates/goose-cli/src/cli.rs @@ -843,6 +843,13 @@ pub async fn cli() -> Result<()> { let session_start = std::time::Instant::now(); let session_type = if resume { "resumed" } else { "new" }; + tracing::info!( + counter.goose.session_starts = 1, + session_type, + interactive = true, + "Session started" + ); + let session_id = if let Some(id) = identifier { Some(get_session_id(id).await?) } else { @@ -901,6 +908,20 @@ pub async fn cli() -> Result<()> { "Session completed" ); + tracing::info!( + counter.goose.session_duration_ms = session_duration.as_millis() as u64, + session_type, + "Session duration" + ); + + if total_tokens > 0 { + tracing::info!( + counter.goose.session_tokens = total_tokens, + session_type, + "Session tokens" + ); + } + Ok(()) } };