@@ -24,10 +24,10 @@ pub struct LambdaTelemetry {
24
24
#[ serde( tag = "type" , content = "record" , rename_all = "lowercase" ) ]
25
25
pub enum LambdaTelemetryRecord {
26
26
/// Function log records
27
- Function ( String ) ,
27
+ Function ( serde_json :: Value ) ,
28
28
29
29
/// Extension log records
30
- Extension ( String ) ,
30
+ Extension ( serde_json :: Value ) ,
31
31
32
32
/// Platform init start record
33
33
#[ serde( rename = "platform.initStart" , rename_all = "camelCase" ) ]
@@ -336,13 +336,13 @@ mod deserialization_tests {
336
336
// function
337
337
function: (
338
338
r#"{"time": "2020-08-20T12:31:32.123Z","type": "function", "record": "hello world"}"# ,
339
- LambdaTelemetryRecord :: Function ( "hello world" . to_string( ) ) ,
339
+ LambdaTelemetryRecord :: Function ( serde_json :: Value :: String ( "hello world" . to_string( ) ) ) ,
340
340
) ,
341
341
342
342
// extension
343
343
extension: (
344
344
r#"{"time": "2020-08-20T12:31:32.123Z","type": "extension", "record": "hello world"}"# ,
345
- LambdaTelemetryRecord :: Extension ( "hello world" . to_string( ) ) ,
345
+ LambdaTelemetryRecord :: Extension ( serde_json :: Value :: String ( "hello world" . to_string( ) ) ) ,
346
346
) ,
347
347
348
348
// platform.start
@@ -498,15 +498,15 @@ mod serialization_tests {
498
498
function: (
499
499
LambdaTelemetry {
500
500
time: Utc . with_ymd_and_hms( 2023 , 11 , 28 , 12 , 0 , 9 ) . unwrap( ) ,
501
- record: LambdaTelemetryRecord :: Function ( "hello world" . to_string( ) ) ,
501
+ record: LambdaTelemetryRecord :: Function ( serde_json :: Value :: String ( "hello world" . to_string( ) ) ) ,
502
502
} ,
503
503
r#"{"time":"2023-11-28T12:00:09Z","type":"function","record":"hello world"}"# ,
504
504
) ,
505
505
// extension
506
506
extension: (
507
507
LambdaTelemetry {
508
508
time: Utc . with_ymd_and_hms( 2023 , 11 , 28 , 12 , 0 , 9 ) . unwrap( ) ,
509
- record: LambdaTelemetryRecord :: Extension ( "hello world" . to_string( ) ) ,
509
+ record: LambdaTelemetryRecord :: Extension ( serde_json :: Value :: String ( "hello world" . to_string( ) ) ) ,
510
510
} ,
511
511
r#"{"time":"2023-11-28T12:00:09Z","type":"extension","record":"hello world"}"# ,
512
512
) ,
0 commit comments