Skip to content

Commit

Permalink
clippy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamdavidonuh committed Jun 2, 2024
1 parent f7c5ee9 commit e67b2ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ahnlich/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub async fn run_server(config: ServerConfig) -> std::io::Result<()> {
.otel_endpoint
.unwrap_or("http://127.0.0.1:4317".to_string());
let log_level = &config.log_level;
init_tracing("ahnlich-db", Some(log_level), &otel_url);
init_tracing("ahnlich-db", Some(log_level), otel_url);
}

let listener =
Expand Down
4 changes: 2 additions & 2 deletions ahnlich/tracer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use opentelemetry_sdk::{
Resource,
};
use tracing::subscriber::set_global_default;
use tracing_subscriber::{layer::SubscriberExt, prelude::*, EnvFilter, Registry};
use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry};

pub fn init_tracing(service_name: &'static str, log_level: Option<&str>, otel_url: &str) {
let env_filter = EnvFilter::new(log_level.unwrap_or_else(|| "info"));
let env_filter = EnvFilter::new(log_level.unwrap_or("info"));
//let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));

let otel_layer = tracing_opentelemetry::layer().with_tracer(
Expand Down

0 comments on commit e67b2ac

Please sign in to comment.