Disable stdout for traces.
Frankly the stdout traces are pretty useless if you have anything more than the most trivial amount of entries.
This commit is contained in:
		
							parent
							
								
									559f6e6173
								
							
						
					
					
						commit
						d4887ec311
					
				
							
								
								
									
										15
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/main.rs
									
									
									
									
									
								
							| @ -2,7 +2,6 @@ | ||||
| use crate::parser::document; | ||||
| use tracing_subscriber::EnvFilter; | ||||
| mod parser; | ||||
| use tracing_subscriber::fmt; | ||||
| use tracing_subscriber::layer::SubscriberExt; | ||||
| use tracing_subscriber::util::SubscriberInitExt; | ||||
| 
 | ||||
| @ -19,12 +18,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | ||||
| fn init_telemetry() -> Result<(), Box<dyn std::error::Error>> { | ||||
|     let env_filter = EnvFilter::try_from_default_env().unwrap_or(EnvFilter::new("WARN")); | ||||
| 
 | ||||
|     let stdout = fmt::Layer::new() | ||||
|         .pretty() | ||||
|         .with_file(true) | ||||
|         .with_line_number(true) | ||||
|         .with_thread_ids(false) | ||||
|         .with_target(false); | ||||
|     // let stdout = tracing_subscriber::fmt::Layer::new()
 | ||||
|     //     .pretty()
 | ||||
|     //     .with_file(true)
 | ||||
|     //     .with_line_number(true)
 | ||||
|     //     .with_thread_ids(false)
 | ||||
|     //     .with_target(false);
 | ||||
| 
 | ||||
|     opentelemetry::global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); | ||||
|     let tracer = opentelemetry_jaeger::new_pipeline() | ||||
| @ -36,7 +35,7 @@ fn init_telemetry() -> Result<(), Box<dyn std::error::Error>> { | ||||
|     tracing_subscriber::registry() | ||||
|         .with(env_filter) | ||||
|         .with(opentelemetry) | ||||
|         .with(stdout) | ||||
|         // .with(stdout)
 | ||||
|         .try_init()?; | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander