From 9351d862cf46cc70012c9d942ed5e7ec697ef3dc Mon Sep 17 00:00:00 2001 From: Renato Dinhani <101204870+dinhani-cw@users.noreply.github.com> Date: Wed, 29 May 2024 21:24:29 -0300 Subject: [PATCH] feat: do not send tokio events to opentelemetry server (#953) --- docker-compose.yaml | 7 ------- src/infra/tracing.rs | 11 +++++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 206c6f4c7..95cd19627 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -37,13 +37,6 @@ services: jaeger: image: jaegertracing/all-in-one:1.57 - environment: - SPAN_STORAGE_TYPE: badger - BADGER_EPHEMERAL: false - BADGER_DIRECTORY_VALUE: /badger/data - BADGER_DIRECTORY_KEY: /badger/key - volumes: - - /tmp:/badger ports: - 4317:4317 - 16686:16686 diff --git a/src/infra/tracing.rs b/src/infra/tracing.rs index 7e1b16a96..a2a424b2e 100644 --- a/src/infra/tracing.rs +++ b/src/infra/tracing.rs @@ -35,9 +35,9 @@ pub async fn init_tracing(url: Option<&String>, enable_console: bool) { } else { println!("tracing registry enabling text logs"); fmt::Layer::default() - .with_target(true) - .with_thread_ids(true) - .with_thread_names(true) + .with_target(false) + .with_thread_ids(false) + .with_thread_names(false) .with_filter(EnvFilter::from_default_env()) .boxed() }; @@ -56,7 +56,10 @@ pub async fn init_tracing(url: Option<&String>, enable_console: bool) { .install_batch(runtime::Tokio) .unwrap(); - let layer = tracing_opentelemetry::layer().with_tracked_inactivity(false).with_tracer(tracer); + let layer = tracing_opentelemetry::layer() + .with_tracked_inactivity(false) + .with_tracer(tracer) + .with_filter(EnvFilter::from_default_env()); Some(layer) } None => {