File tree Expand file tree Collapse file tree
crates/arroyo-server-common/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ macro_rules! register_log {
8080 } } ;
8181}
8282
83- pub fn init_logging_with_filter ( _name : & str , filter : EnvFilter ) -> Option < WorkerGuard > {
83+ pub fn init_logging_with_filter ( name : & str , filter : EnvFilter ) -> Option < WorkerGuard > {
8484 init_event_logger ( Arc :: new ( AnalyticsEventLogger :: new ( ) ) ) ;
8585
8686 if let Err ( e) = LogTracer :: init ( ) {
@@ -139,6 +139,11 @@ pub fn init_logging_with_filter(_name: &str, filter: EnvFilter) -> Option<Worker
139139 layer. with_file ( "filename" ) ;
140140 }
141141
142+ layer. add_static_field ( "arroyo_service" , serde_json:: json!( name) ) ;
143+ if let Ok ( pipeline_id) = env:: var ( arroyo_types:: PIPELINE_ID_ENV ) {
144+ layer. add_static_field ( "pipeline_id" , serde_json:: json!( pipeline_id) ) ;
145+ }
146+
142147 // add static fields
143148 for ( key, value) in & config ( ) . logging . static_fields {
144149 layer. add_static_field ( key, serde_json:: json!( value) ) ;
You can’t perform that action at this time.
0 commit comments