@@ -79,6 +79,13 @@ pub struct LogRecord {
7979     /// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. 
8080     /// Value of 0 indicates unknown or missing timestamp. 
8181     #[ prost( fixed64,  tag = "1" ) ]  
82+     #[ cfg_attr(  
83+         feature = "with-serde" ,  
84+         serde(  
85+             serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,  
86+             deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"  
87+         )  
88+     ) ]  
8289    pub  time_unix_nano :  u64 , 
8390    /// Time when the event was observed by the collection system. 
8491     /// For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) 
@@ -96,6 +103,13 @@ pub struct LogRecord {
96103     /// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. 
97104     /// Value of 0 indicates unknown or missing timestamp. 
98105     #[ prost( fixed64,  tag = "11" ) ]  
106+     #[ cfg_attr(  
107+         feature = "with-serde" ,  
108+         serde(  
109+             serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,  
110+             deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"  
111+         )  
112+     ) ]  
99113    pub  observed_time_unix_nano :  u64 , 
100114    /// Numerical value of the severity, normalized to values described in Log Data Model. 
101115     /// \[Optional\]. 
@@ -136,6 +150,13 @@ pub struct LogRecord {
136150     ///    - the field is not present, 
137151     ///    - the field contains an invalid value. 
138152     #[ prost( bytes = "vec" ,  tag = "9" ) ]  
153+     #[ cfg_attr(  
154+         feature = "with-serde" ,  
155+         serde(  
156+             serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,  
157+             deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"  
158+         )  
159+     ) ]  
139160    pub  trace_id :  :: prost:: alloc:: vec:: Vec < u8 > , 
140161    /// A unique identifier for a span within a trace, assigned when the span 
141162     /// is created. The ID is an 8-byte array. An ID with all zeroes OR of length 
@@ -150,6 +171,13 @@ pub struct LogRecord {
150171     ///    - the field is not present, 
151172     ///    - the field contains an invalid value. 
152173     #[ prost( bytes = "vec" ,  tag = "10" ) ]  
174+     #[ cfg_attr(  
175+         feature = "with-serde" ,  
176+         serde(  
177+             serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,  
178+             deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"  
179+         )  
180+     ) ]  
153181    pub  span_id :  :: prost:: alloc:: vec:: Vec < u8 > , 
154182} 
155183/// Possible values for LogRecord.SeverityNumber. 
0 commit comments