Mnovich/otlp v2 (#3772)

This commit is contained in:
Max Novich
2025-08-01 12:15:12 -07:00
committed by GitHub
parent 1a8b3b1a42
commit 3b6a92b715
8 changed files with 602 additions and 35 deletions
+16 -2
View File
@@ -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());
}