@@ -15,7 +15,7 @@ use crate::logs::processor::{Processor, Rule};
1515use crate :: tags:: provider;
1616
1717use crate :: logs:: lambda:: Message ;
18- use datadog_log_agent:: { AggregatorHandle , LogEntry } ;
18+ use datadog_log_agent:: { AggregatorHandle , IntakeEntry } ;
1919
2020const OOM_ERRORS : [ & str ; 7 ] = [
2121 "fatal error: runtime: out of memory" , // Go
@@ -44,9 +44,9 @@ pub struct LambdaProcessor {
4444 // Current Invocation Context
4545 invocation_context : InvocationContext ,
4646 // Logs which don't have a `request_id`
47- orphan_logs : Vec < LogEntry > ,
47+ orphan_logs : Vec < IntakeEntry > ,
4848 // Logs which are ready to be aggregated
49- ready_logs : Vec < LogEntry > ,
49+ ready_logs : Vec < IntakeEntry > ,
5050 // Main event bus
5151 event_bus : Sender < Event > ,
5252 // Logs enabled
@@ -71,7 +71,7 @@ fn map_log_level_to_status(level: &str) -> Option<&'static str> {
7171 }
7272}
7373
74- impl Processor < LogEntry > for LambdaProcessor { }
74+ impl Processor < IntakeEntry > for LambdaProcessor { }
7575
7676impl LambdaProcessor {
7777 #[ must_use]
@@ -354,7 +354,10 @@ impl LambdaProcessor {
354354 }
355355 }
356356
357- fn get_log_entry ( & mut self , mut lambda_message : Message ) -> Result < LogEntry , Box < dyn Error > > {
357+ fn get_log_entry (
358+ & mut self ,
359+ mut lambda_message : Message ,
360+ ) -> Result < IntakeEntry , Box < dyn Error > > {
358361 // Assign request_id from message or context if available
359362 lambda_message. lambda . request_id = match lambda_message. lambda . request_id {
360363 Some ( request_id) => Some ( request_id) ,
@@ -413,7 +416,7 @@ impl LambdaProcessor {
413416 } ) ,
414417 ) ;
415418
416- let entry = LogEntry {
419+ let entry = IntakeEntry {
417420 message : final_message,
418421 timestamp : lambda_message. timestamp ,
419422 hostname : Some ( self . function_arn . clone ( ) ) ,
@@ -472,7 +475,7 @@ impl LambdaProcessor {
472475 original_message
473476 }
474477
475- async fn make_log ( & mut self , event : TelemetryEvent ) -> Result < LogEntry , Box < dyn Error > > {
478+ async fn make_log ( & mut self , event : TelemetryEvent ) -> Result < IntakeEntry , Box < dyn Error > > {
476479 match self . get_message ( event) . await {
477480 Ok ( lambda_message) => self . get_log_entry ( lambda_message) ,
478481 // TODO: Check what to do when we can't process the event
@@ -481,7 +484,7 @@ impl LambdaProcessor {
481484 }
482485
483486 /// Processes a log, applies filtering rules, and queues it for aggregation
484- fn process_and_queue_log ( & mut self , mut log : LogEntry ) {
487+ fn process_and_queue_log ( & mut self , mut log : IntakeEntry ) {
485488 let should_send_log =
486489 self . logs_enabled && LambdaProcessor :: apply_rules ( & self . rules , & mut log. message ) ;
487490 if should_send_log {
@@ -531,7 +534,7 @@ mod tests {
531534 RuntimeDoneMetrics , Status ,
532535 } ;
533536 use crate :: logs:: lambda:: Lambda ;
534- use datadog_log_agent:: { AggregatorService , LogEntry } ;
537+ use datadog_log_agent:: { AggregatorService , IntakeEntry } ;
535538
536539 macro_rules! get_message_tests {
537540 ( $( $name: ident: $value: expr, ) * ) => {
@@ -1096,7 +1099,7 @@ mod tests {
10961099 let batches = aggregator_handle. get_batches ( ) . await . unwrap ( ) ;
10971100 assert_eq ! ( batches. len( ) , 1 ) ;
10981101
1099- let entries: Vec < LogEntry > = serde_json:: from_slice ( & batches[ 0 ] ) . unwrap ( ) ;
1102+ let entries: Vec < IntakeEntry > = serde_json:: from_slice ( & batches[ 0 ] ) . unwrap ( ) ;
11001103 assert_eq ! ( entries. len( ) , 1 ) ;
11011104 let entry = & entries[ 0 ] ;
11021105 assert_eq ! (
@@ -1283,7 +1286,7 @@ mod tests {
12831286 let batches = aggregator_handle. get_batches ( ) . await . unwrap ( ) ;
12841287 assert_eq ! ( batches. len( ) , 1 ) ;
12851288
1286- let entries: Vec < LogEntry > = serde_json:: from_slice ( & batches[ 0 ] ) . unwrap ( ) ;
1289+ let entries: Vec < IntakeEntry > = serde_json:: from_slice ( & batches[ 0 ] ) . unwrap ( ) ;
12871290 assert_eq ! ( entries. len( ) , 2 ) ;
12881291 let start_entry = & entries[ 0 ] ;
12891292 assert_eq ! (
0 commit comments