mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
Put it back
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user