semantic bufo search find-bufo.com
bufo

filter logfire traces to info level and above

use logfire sdk's with_default_level_filter(LevelFilter::INFO) to exclude
trace and debug level spans from actix-http internals (timers, flags, etc).
only capture info-level spans like requests and our custom search spans.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+3 -3
+3 -1
src/main.rs
··· 10 10 use anyhow::Result; 11 11 use config::Config; 12 12 use opentelemetry_instrumentation_actix_web::{RequestMetrics, RequestTracing}; 13 + use tracing::level_filters::LevelFilter; 13 14 14 15 async fn index() -> HttpResponse { 15 16 HttpResponse::Ok() ··· 21 22 async fn main() -> Result<()> { 22 23 dotenv::dotenv().ok(); 23 24 24 - // initialize logfire 25 + // initialize logfire with info level filter to exclude trace/debug spans 25 26 let logfire = logfire::configure() 27 + .with_default_level_filter(LevelFilter::INFO) 26 28 .finish() 27 29 .map_err(|e| anyhow::anyhow!("failed to initialize logfire: {}", e))?; 28 30
-2
src/search.rs
··· 3 3 use crate::turbopuffer::{QueryRequest, TurbopufferClient}; 4 4 use actix_web::{web, HttpResponse, Result as ActixResult}; 5 5 use serde::{Deserialize, Serialize}; 6 - use tracing::instrument; 7 6 8 7 #[derive(Debug, Deserialize)] 9 8 pub struct SearchQuery { ··· 29 28 pub score: f32, // normalized 0-1 score for display 30 29 } 31 30 32 - #[instrument(skip(config), fields(query = %query.query, top_k = query.top_k))] 33 31 pub async fn search( 34 32 query: web::Json<SearchQuery>, 35 33 config: web::Data<Config>,