Mnovich/otlp v2 (#3772)
This commit is contained in:
@@ -701,6 +701,28 @@ pub async fn cli() -> Result<()> {
|
||||
eprintln!("Warning: Failed to update project tracker: {}", e);
|
||||
}
|
||||
|
||||
let command_name = match &cli.command {
|
||||
Some(Command::Configure {}) => "configure",
|
||||
Some(Command::Info { .. }) => "info",
|
||||
Some(Command::Mcp { .. }) => "mcp",
|
||||
Some(Command::Session { .. }) => "session",
|
||||
Some(Command::Project {}) => "project",
|
||||
Some(Command::Projects) => "projects",
|
||||
Some(Command::Run { .. }) => "run",
|
||||
Some(Command::Schedule { .. }) => "schedule",
|
||||
Some(Command::Update { .. }) => "update",
|
||||
Some(Command::Bench { .. }) => "bench",
|
||||
Some(Command::Recipe { .. }) => "recipe",
|
||||
Some(Command::Web { .. }) => "web",
|
||||
None => "default_session",
|
||||
};
|
||||
|
||||
tracing::info!(
|
||||
monotonic_counter.goose.cli_commands = 1,
|
||||
command = command_name,
|
||||
"CLI command executed"
|
||||
);
|
||||
|
||||
match cli.command {
|
||||
Some(Command::Configure {}) => {
|
||||
let _ = handle_configure().await;
|
||||
@@ -875,6 +897,11 @@ pub async fn cli() -> Result<()> {
|
||||
(input_config, None)
|
||||
}
|
||||
(_, _, Some(recipe_name)) => {
|
||||
tracing::info!(monotonic_counter.goose.recipe_runs = 1,
|
||||
recipe_name = %recipe_name,
|
||||
"Recipe execution started"
|
||||
);
|
||||
|
||||
if explain {
|
||||
explain_recipe(&recipe_name, params)?;
|
||||
return Ok(());
|
||||
|
||||
@@ -11,7 +11,7 @@ use tracing_subscriber::{
|
||||
Registry,
|
||||
};
|
||||
|
||||
use goose::tracing::langfuse_layer;
|
||||
use goose::tracing::{langfuse_layer, otlp_layer};
|
||||
use goose_bench::bench_session::BenchAgentError;
|
||||
use goose_bench::error_capture::ErrorCaptureLayer;
|
||||
|
||||
@@ -140,7 +140,21 @@ fn setup_logging_internal(
|
||||
layers.push(ErrorCaptureLayer::new().boxed());
|
||||
}
|
||||
|
||||
// Add Langfuse layer if available
|
||||
if !force {
|
||||
if let Ok((otlp_tracing_layer, otlp_metrics_layer)) = otlp_layer::init_otlp() {
|
||||
layers.push(
|
||||
otlp_tracing_layer
|
||||
.with_filter(otlp_layer::create_otlp_tracing_filter())
|
||||
.boxed(),
|
||||
);
|
||||
layers.push(
|
||||
otlp_metrics_layer
|
||||
.with_filter(otlp_layer::create_otlp_metrics_filter())
|
||||
.boxed(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(langfuse) = langfuse_layer::create_langfuse_observer() {
|
||||
layers.push(langfuse.with_filter(LevelFilter::DEBUG).boxed());
|
||||
}
|
||||
|
||||
@@ -1009,6 +1009,17 @@ impl Session {
|
||||
}
|
||||
// otherwise we have a model/tool to render
|
||||
else {
|
||||
for content in &message.content {
|
||||
if let MessageContent::ToolRequest(tool_request) = content {
|
||||
if let Ok(tool_call) = &tool_request.tool_call {
|
||||
tracing::info!(monotonic_counter.goose.tool_calls = 1,
|
||||
tool_name = %tool_call.name,
|
||||
"Tool call executed"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
push_message(&mut self.messages, message.clone());
|
||||
|
||||
// No need to update description on assistant messages
|
||||
|
||||
Reference in New Issue
Block a user